forgejo-release/testdata/nested-upload-download/.forgejo/workflows/test.yml

44 lines
1.3 KiB
YAML
Raw Normal View History

name: Upload & Download a Forgejo Release
2023-03-29 15:16:26 +00:00
on: [push]
jobs:
setup-forgejo:
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- id: forgejo
uses: https://code.forgejo.org/actions/setup-forgejo@v1
with:
2023-03-29 17:20:39 +00:00
user: testuser
2023-03-29 15:16:26 +00:00
password: admin1234
lxc-ip-prefix: 10.0.15
- id: testrepo
run: |
forgejo-test-helper.sh push testrepo http://testuser:admin1234@${{ steps.forgejo.outputs.host-port }} testuser testrepo > /tmp/output
grep '^sha=' < /tmp/output >> $GITHUB_OUTPUT
2023-03-29 15:16:26 +00:00
- id: release-upload
uses: SELF@vTest
with:
direction: upload
url: ${{ steps.forgejo.outputs.url }}
2023-03-29 17:20:39 +00:00
repo: testuser/testrepo
2023-03-29 15:16:26 +00:00
tag: v1.0
sha: ${{ steps.testrepo.outputs.sha }}
2023-03-29 17:20:39 +00:00
doer: testuser
2023-03-29 15:16:26 +00:00
token: ${{ steps.forgejo.outputs.token }}
release-dir: upload-dir
2023-03-29 21:59:02 +00:00
release-notes: "RELEASE NOTES"
2023-03-29 15:16:26 +00:00
verbose: true
- id: release-download
uses: SELF@vTest
with:
direction: download
url: ${{ steps.forgejo.outputs.url }}
2023-03-29 17:20:39 +00:00
repo: testuser/testrepo
2023-03-29 15:16:26 +00:00
tag: v1.0
2023-03-29 17:20:39 +00:00
doer: testuser
2023-03-29 15:16:26 +00:00
token: ${{ steps.forgejo.outputs.token }}
release-dir: download-dir
verbose: true
- run: |
diff -u upload-dir download-dir