mirror of
https://code.forgejo.org/actions/forgejo-release.git
synced 2025-09-07 08:31:55 +03:00
Escape shell variables
I might have faced a problem caused by multiline release notes. Irrespective of that, this commit fixes most of the shellcheck warnings. At the tea invocation, `releaseType` may not be quoted to avoid an empty argument for stable releases.
This commit is contained in:
parent
9f05f9811a
commit
31e2907aa0
2 changed files with 50 additions and 50 deletions
24
action.yml
24
action.yml
|
@ -69,9 +69,9 @@ runs:
|
|||
export FORGEJO="${{ inputs.url }}"
|
||||
# A trailing / will mean http://forgejo//api/v1 is used
|
||||
# and it always 401 as of v1.19, because of the double slash
|
||||
FORGEJO=${FORGEJO%%/}
|
||||
export SCHEME=${FORGEJO%://*}
|
||||
export HOST=${FORGEJO#*://}
|
||||
FORGEJO="${FORGEJO%%/}"
|
||||
export SCHEME="${FORGEJO%://*}"
|
||||
export HOST="${FORGEJO#*://}"
|
||||
|
||||
export REPO="${{ inputs.repo }}"
|
||||
|
||||
|
@ -84,18 +84,18 @@ runs:
|
|||
export PRERELEASE="${{ inputs.prerelease }}"
|
||||
|
||||
export RELEASE_NOTES_ASSISTANT="${{ inputs.release-notes-assistant }}"
|
||||
export RELEASE_NOTES_ASSISTANT_WORKDIR=${{ forge.action_path }}/rna
|
||||
export RELEASE_NOTES_ASSISTANT_WORKDIR="${{ forge.action_path }}/rna"
|
||||
|
||||
export HIDE_ARCHIVE_LINK="${{ inputs.hide-archive-link }}"
|
||||
|
||||
export TOKEN=${{ inputs.token }}
|
||||
export TOKEN="${{ inputs.token }}"
|
||||
|
||||
export RELEASE_DIR="${{ inputs.release-dir }}"
|
||||
|
||||
export RELEASENOTES=$(cat << 'EOF'
|
||||
export RELEASENOTES="$(cat << 'EOF'
|
||||
${{ inputs.release-notes }}
|
||||
EOF
|
||||
)
|
||||
)"
|
||||
|
||||
export SHA="${{ inputs.sha }}"
|
||||
|
||||
|
@ -105,12 +105,12 @@ runs:
|
|||
|
||||
export RETRY="${{ inputs.download-retry }}"
|
||||
|
||||
export TMP_DIR=$(mktemp -d)
|
||||
trap "rm -fr $TMP_DIR" EXIT
|
||||
export TMP_DIR="$(mktemp -d)"
|
||||
trap "rm -fr '$TMP_DIR'" EXIT
|
||||
|
||||
echo -n "${{ inputs.gpg-private-key }}" > $TMP_DIR/gpg-private-key
|
||||
export GPG_PRIVATE_KEY=$TMP_DIR/gpg-private-key
|
||||
echo -n "${{ inputs.gpg-passphrase }}" > $TMP_DIR/gpg-passphrase
|
||||
echo -n "${{ inputs.gpg-private-key }}" > "$TMP_DIR/gpg-private-key"
|
||||
export GPG_PRIVATE_KEY="$TMP_DIR/gpg-private-key"
|
||||
echo -n "${{ inputs.gpg-passphrase }}" > "$TMP_DIR/gpg-passphrase"
|
||||
export GPG_PASSPHRASE="$TMP_DIR/gpg-passphrase"
|
||||
|
||||
forgejo-release.sh ${{ inputs.direction }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue