mirror of
https://code.forgejo.org/actions/forgejo-release.git
synced 2024-11-06 03:25:45 -05:00
specify the SHA when the repo running the action is unrelated
This commit is contained in:
parent
21454480e1
commit
429c93d710
2 changed files with 12 additions and 4 deletions
|
@ -12,6 +12,8 @@ inputs:
|
||||||
tag:
|
tag:
|
||||||
description: 'Tag of the release'
|
description: 'Tag of the release'
|
||||||
required: true
|
required: true
|
||||||
|
sha:
|
||||||
|
description: 'SHA of the release'
|
||||||
doer:
|
doer:
|
||||||
description: 'Forgejo user authoring the upload'
|
description: 'Forgejo user authoring the upload'
|
||||||
token:
|
token:
|
||||||
|
@ -40,6 +42,9 @@ runs:
|
||||||
export TOKEN="${{ inputs.token }}"
|
export TOKEN="${{ inputs.token }}"
|
||||||
export RELEASE_DIR="${{ inputs.release-dir }}"
|
export RELEASE_DIR="${{ inputs.release-dir }}"
|
||||||
export VERBOSE="${{ inputs.verbose }}"
|
export VERBOSE="${{ inputs.verbose }}"
|
||||||
export SHA="${{ github.sha }}"
|
export SHA="${{ inputs.sha }}"
|
||||||
|
if test -z "$SHA"; then
|
||||||
|
export SHA="${{ github.sha }}"
|
||||||
|
fi
|
||||||
forgejo-release.sh ${{ inputs.direction }}
|
forgejo-release.sh ${{ inputs.direction }}
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
name: Upload a Forgejo Release
|
name: Upload & Download a Forgejo Release
|
||||||
on: [push]
|
on: [push]
|
||||||
jobs:
|
jobs:
|
||||||
setup-forgejo:
|
setup-forgejo:
|
||||||
|
@ -10,8 +10,10 @@ jobs:
|
||||||
with:
|
with:
|
||||||
user: testuser
|
user: testuser
|
||||||
password: admin1234
|
password: admin1234
|
||||||
- run: |
|
- id: testrepo
|
||||||
forgejo-test-helper.sh push testrepo http://testuser:admin1234@${{ steps.forgejo.outputs.host-port }} testuser 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
|
||||||
- id: release-upload
|
- id: release-upload
|
||||||
uses: SELF@vTest
|
uses: SELF@vTest
|
||||||
with:
|
with:
|
||||||
|
@ -19,6 +21,7 @@ jobs:
|
||||||
url: ${{ steps.forgejo.outputs.url }}
|
url: ${{ steps.forgejo.outputs.url }}
|
||||||
repo: testuser/testrepo
|
repo: testuser/testrepo
|
||||||
tag: v1.0
|
tag: v1.0
|
||||||
|
sha: ${{ steps.testrepo.outputs.sha }}
|
||||||
doer: testuser
|
doer: testuser
|
||||||
token: ${{ steps.forgejo.outputs.token }}
|
token: ${{ steps.forgejo.outputs.token }}
|
||||||
release-dir: upload-dir
|
release-dir: upload-dir
|
||||||
|
|
Loading…
Reference in a new issue