github.com/nektos/act@v0.2.83/pkg/artifacts/testdata/v4/artifacts.yml (about)

     1  on:
     2    push:
     3  jobs:
     4    _5:
     5      runs-on: ubuntu-latest
     6      steps: 
     7      - run: env
     8      - run: |
     9          github:
    10          ${{ tojson(github) }}
    11          inputs:
    12          ${{ tojson(inputs) }}
    13          matrix:
    14          ${{ tojson(matrix) }}
    15          needs:
    16          ${{ tojson(needs) }}
    17          strategy:
    18          ${{ tojson(strategy) }}            
    19        shell: cp {0} context.txt
    20      - run: echo Artifact2 > data.txt
    21  
    22      - uses: actions/upload-artifact@v4
    23        with:
    24          name: test
    25          path: context.txt
    26  
    27      - uses: actions/upload-artifact@v4
    28        with:
    29          name: test2
    30          path: data.txt
    31  
    32      - uses: actions/download-artifact@v4
    33        with:
    34          name: test
    35          path: out
    36      - run: cat out/context.txt
    37  
    38      - name: assert
    39        run: |
    40          [[ "$(cat context.txt)" = "$(cat out/context.txt)" ]] || exit 1
    41        shell: bash
    42  
    43      - run: |
    44          No content        
    45        shell: cp {0} context.txt
    46      - uses: actions/upload-artifact@v4
    47        with:
    48          name: test
    49          path: context.txt
    50          overwrite: true
    51    
    52      - uses: actions/download-artifact@v4
    53        with:
    54          name: test
    55          path: out2
    56      - run: cat out2/context.txt
    57  
    58      - name: assert 2
    59        run: |
    60          [[ "$(cat context.txt)" = "$(cat out2/context.txt)" ]] || exit 1
    61        shell: bash
    62  
    63      - uses: actions/download-artifact@v4
    64        with:
    65          name: test2
    66          path: out3
    67      - run: cat out3/data.txt
    68  
    69      - name: assert 3
    70        run: |
    71          [[ "$(cat data.txt)" = "$(cat out3/data.txt)" ]] || exit 1
    72        shell: bash
    73  
    74      - uses: actions/download-artifact@v4
    75        with:
    76          pattern: "test*"
    77          path: out4
    78          merge-multiple: true
    79  
    80      - run: cat out4/data.txt
    81      - run: cat out4/context.txt
    82  
    83      - name: assert 4
    84        run: |
    85          [[ "$(cat context.txt)" = "$(cat out4/context.txt)" ]] || exit 1
    86          [[ "$(cat data.txt)" = "$(cat out4/data.txt)" ]] || exit 1
    87        shell: bash