mirror of
https://code.forgejo.org/actions/forgejo-release.git
synced 2024-11-24 15:40:55 -05:00
51 lines
1.6 KiB
YAML
51 lines
1.6 KiB
YAML
# SPDX-License-Identifier: MIT
|
|
|
|
#
|
|
# Upload (and download) a release to (and from) a project
|
|
# found in a Forgejo instance that is different from the one running the workflow
|
|
#
|
|
name: two Forgejo
|
|
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:
|
|
user: testuser
|
|
password: admin1234
|
|
lxc-ip-prefix: 10.0.15
|
|
image-version: 1.20
|
|
- id: testrepo
|
|
run: |
|
|
url=http://testuser:admin1234@${{ steps.forgejo.outputs.host-port }}
|
|
forgejo-test-helper.sh push testrepo $url testuser testrepo > /tmp/output
|
|
echo sha=$(forgejo-test-helper.sh branch_tip $url testuser/testrepo main) >> $GITHUB_OUTPUT
|
|
- id: release-upload
|
|
uses: SELF@vTest
|
|
with:
|
|
direction: upload
|
|
url: ${{ steps.forgejo.outputs.url }}
|
|
repo: testuser/testrepo
|
|
tag: v1.0
|
|
sha: ${{ steps.testrepo.outputs.sha }}
|
|
token: ${{ steps.forgejo.outputs.token }}
|
|
release-dir: upload-dir
|
|
release-notes: "RELEASE NOTES"
|
|
verbose: true
|
|
- id: release-download
|
|
uses: SELF@vTest
|
|
with:
|
|
direction: download
|
|
url: ${{ steps.forgejo.outputs.url }}
|
|
repo: testuser/testrepo
|
|
tag: v1.0
|
|
token: ${{ steps.forgejo.outputs.token }}
|
|
release-dir: download-dir
|
|
verbose: true
|
|
- run: |
|
|
diff -u upload-dir download-dir
|
|
- if: failure()
|
|
run: docker logs forgejo
|