1
0
Fork 0
mirror of https://code.forgejo.org/actions/setup-forgejo synced 2025-06-08 03:58:19 +02:00

add example of artifact usage

This commit is contained in:
Earl Warren 2023-09-29 16:35:59 +02:00
parent 356d879c4d
commit fc548f5117
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
4 changed files with 49 additions and 2 deletions

View file

@ -0,0 +1,22 @@
on: [push]
jobs:
upload:
runs-on: docker
steps:
- run: mkdir -p artifacts
- run: touch artifacts/ONE artifacts/TWO
- uses: actions/upload-artifact@v3
with:
name: many-artifacts
path: artifacts/
download:
runs-on: docker
steps:
- uses: actions/download-artifact@v3
- run: |
test -f many-artifacts/ONE
test -f many-artifacts/TWO

View file

@ -0,0 +1,24 @@
on: [push]
jobs:
upload:
runs-on: docker
steps:
- run: mkdir -p path/to/artifact
- run: echo hello > path/to/artifact/world.txt
- uses: actions/upload-artifact@v3
with:
name: my-artifact
path: path/to/artifact/world.txt
download:
runs-on: docker
steps:
- run: "! test -f world.txt"
- uses: actions/download-artifact@v3
with:
name: my-artifact
- run: "test -f world.txt"