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

67 lines
2 KiB
YAML
Raw Normal View History

2023-05-26 15:48:58 +03:00
# SPDX-License-Identifier: MIT
name: Upload (and download) a release to (and from) the project that runs the workflow
2023-03-30 09:52:59 +03:00
on: [push]
jobs:
2023-05-26 15:48:58 +03:00
upload-download:
2023-03-30 09:52:59 +03:00
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
2023-03-31 00:30:41 +03:00
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
id: release-upload
2023-03-30 09:52:59 +03:00
uses: SELF@vTest
with:
direction: upload
tag: v1.0
token: FORGEJO_TOKEN
2023-03-30 09:52:59 +03:00
release-dir: upload-dir
release-notes: "RELEASE NOTES"
verbose: true
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
id: release-upload-override
uses: SELF@vTest
with:
direction: upload
tag: v1.0
token: FORGEJO_TOKEN
release-dir: upload-dir
release-notes: "RELEASE NOTES"
override: true
verbose: true
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
id: release-upload-v2
uses: SELF@vTest
with:
direction: upload
tag: v2.0
token: FORGEJO_TOKEN
release-dir: upload-dir-v2
release-notes: "RELEASE NOTES V2"
verbose: true
2023-03-31 00:30:41 +03:00
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
id: release-download
2023-03-30 09:52:59 +03:00
uses: SELF@vTest
with:
direction: download
tag: v1.0
token: FORGEJO_TOKEN
2023-03-30 09:52:59 +03:00
release-dir: download-dir
verbose: true
2023-03-31 00:30:41 +03:00
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
run: |
2023-03-30 09:52:59 +03:00
diff -u upload-dir download-dir
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
id: release-download-latest
uses: SELF@vTest
with:
direction: download
token: FORGEJO_TOKEN
release-dir: download-dir-v2
download-latest: true
verbose: true
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
run: |
diff -u upload-dir-v2 download-dir-v2
- if: failure()
run: docker logs forgejo