mirror of
https://code.forgejo.org/actions/forgejo-release.git
synced 2024-11-21 22:00:58 -05:00
53 lines
1.5 KiB
YAML
53 lines
1.5 KiB
YAML
name: 'Forgejo release download and upload'
|
|
author: 'Forgejo authors'
|
|
description: |
|
|
Upload or download the assets of a release to a Forgejo instance.
|
|
inputs:
|
|
url:
|
|
description: 'URL of the Forgejo instance'
|
|
required: true
|
|
repo:
|
|
description: 'owner/project relative to the URL'
|
|
required: true
|
|
tag:
|
|
description: 'Tag of the release'
|
|
required: true
|
|
sha:
|
|
description: 'SHA of the release'
|
|
doer:
|
|
description: 'Forgejo user authoring the upload'
|
|
token:
|
|
description: 'Forgejo application token'
|
|
required: true
|
|
release-dir:
|
|
description: 'Directory in whichs release assets are uploaded or downloaded'
|
|
required: true
|
|
release-notes:
|
|
description: 'Release notes'
|
|
direction:
|
|
description: 'Can either be download or upload'
|
|
required: true
|
|
verbose:
|
|
description: 'Increase the verbosity level'
|
|
default: 'false'
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- run: echo "${{ github.action_path }}" >> $GITHUB_PATH
|
|
shell: bash
|
|
- run: |
|
|
export FORGEJO="${{ inputs.url }}"
|
|
export REPO="${{ inputs.repo }}"
|
|
export TAG="${{ inputs.tag }}"
|
|
export DOER="${{ inputs.doer }}"
|
|
export TOKEN="${{ inputs.token }}"
|
|
export RELEASE_DIR="${{ inputs.release-dir }}"
|
|
export RELEASENOTES="${{ inputs.release-notes }}"
|
|
export VERBOSE="${{ inputs.verbose }}"
|
|
export SHA="${{ inputs.sha }}"
|
|
if test -z "$SHA"; then
|
|
export SHA="${{ github.sha }}"
|
|
fi
|
|
forgejo-release.sh ${{ inputs.direction }}
|
|
shell: bash
|