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

127 lines
3.8 KiB
YAML
Raw Normal View History

2023-05-26 14:48:58 +02:00
# SPDX-License-Identifier: MIT
name: Upload (and download) a release to (and from) the project that runs the workflow
2023-03-30 08:52:59 +02:00
on: [push]
jobs:
2023-05-26 14:48:58 +02:00
upload-download:
runs-on: lxc-bookworm
2023-03-30 08:52:59 +02:00
steps:
Update actions/checkout action to v6 (#117) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/checkout](https://github.com/actions/checkout) | action | major | `v4` → `v6` | --- ### Release Notes <details> <summary>actions/checkout (actions/checkout)</summary> ### [`v6`](https://github.com/actions/checkout/blob/HEAD/CHANGELOG.md#v600) [Compare Source](https://github.com/actions/checkout/compare/v5...v6) - Persist creds to a separate file by [@&#8203;ericsciple](https://github.com/ericsciple) in [#&#8203;2286](https://github.com/actions/checkout/pull/2286) - Update README to include Node.js 24 support details and requirements by [@&#8203;salmanmkc](https://github.com/salmanmkc) in [#&#8203;2248](https://github.com/actions/checkout/pull/2248) ### [`v5`](https://github.com/actions/checkout/blob/HEAD/CHANGELOG.md#v501) [Compare Source](https://github.com/actions/checkout/compare/v4...v5) - Port v6 cleanup to v5 by [@&#8203;ericsciple](https://github.com/ericsciple) in [#&#8203;2301](https://github.com/actions/checkout/pull/2301) </details> --- ### Configuration 📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi43MS4wIiwidXBkYXRlZEluVmVyIjoiNDIuNzEuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==--> Reviewed-on: https://code.forgejo.org/actions/forgejo-release/pulls/117 Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org> Co-authored-by: Renovate Bot <bot@kriese.eu> Co-committed-by: Renovate Bot <bot@kriese.eu>
2026-01-09 16:59:25 +00:00
- uses: actions/checkout@v6
2023-03-30 23:30:41 +02:00
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
id: release-upload
2023-03-30 08:52:59 +02:00
uses: SELF@vTest
with:
direction: upload
tag: v1.0
token: FORGEJO_TEST_TOKEN
2023-03-30 08:52:59 +02: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_TEST_TOKEN
release-dir: upload-dir
2024-11-18 11:31:53 +01:00
release-notes-assistant: true
hide-archive-link: true
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_TEST_TOKEN
release-dir: upload-dir-v2
release-notes: |-
No shell expansion should on these notes:
- $(some_command)
- `other_commend`
- "double quoted" and 'single quoted' strings
- \backslash escape
- !exclamation_mark
verbose: true
2023-03-30 23:30:41 +02:00
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
id: release-download
2023-03-30 08:52:59 +02:00
uses: SELF@vTest
with:
direction: download
tag: v1.0
token: FORGEJO_TEST_TOKEN
2023-03-30 08:52:59 +02:00
release-dir: download-dir
verbose: true
2023-03-30 23:30:41 +02:00
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
run: |
2023-03-30 08:52:59 +02: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_TEST_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: ${{ !startsWith(github.ref, 'refs/tags/v') }}
id: release-upload-slash-in-tag
uses: SELF@vTest
with:
direction: upload
tag: v/3.0
token: FORGEJO_TEST_TOKEN
release-dir: upload-dir-v3
release-notes: "RELEASE NOTES"
verbose: true
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
id: release-download-with-slash-in-tag
uses: SELF@vTest
with:
direction: download
tag: v/3.0
token: FORGEJO_TEST_TOKEN
release-dir: download-dir-v3
verbose: true
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
run: |
diff -u upload-dir-v3 download-dir-v3
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
id: release-upload-v4
uses: SELF@vTest
with:
direction: upload
tag: v4.0
token: FORGEJO_TEST_TOKEN
skip-assets: true
verbose: true
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
id: release-download-v4
uses: SELF@vTest
with:
direction: download
tag: v4.0
token: FORGEJO_TEST_TOKEN
release-dir: download-dir-v4
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
run: |
if [ ! -d download-dir-v4 ]; then
echo "Missing download dir"
exit 1
fi
if [ ! -z "$( ls -A download-dir-v4 )" ]; then
echo "Unexpected download files: $( ls -A download-dir-v4 )"
exit 1
fi
- if: failure()
run: docker logs forgejo