8000 Added an input for a release id and updated bash script to handle a s… by wattry · Pull Request #21 · skx/github-action-publish-binaries · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Dec 22, 2024. It is now read-only.

Added an input for a release id and updated bash script to handle a s… #21

Merged
merged 1 commit into from
May 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ inputs:
args:
description: 'The pattern of files to upload'
required: true
releaseId:
description: 'The release Id of the release to be targeted.'
required: false
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.args }}
8000 - ${{ inputs.releaseId }}
12 changes: 8 additions & 4 deletions upload-script
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ if [[ -z "$1" ]]; then
exit 1
fi


#
# In the past we invoked a build-script to generate the artifacts
# prior to uploading.
Expand All @@ -27,7 +26,7 @@ fi

# Have we found any artifacts?
found=
for file in $*; do
for file in $1; do
if [ -e "$file" ]; then
found=1
fi
Expand Down Expand Up @@ -55,10 +54,15 @@ fi
AUTH_HEADER="Authorization: token ${GITHUB_TOKEN}"

# Create the correct Upload URL.
RELEASE_ID=$(jq --raw-output '.release.id' "$GITHUB_EVENT_PATH")
# If there is a release id provided then use that else use the event
if [[ -n "$2" ]]; then
RELEASE_ID=$2
else
RELEASE_ID=$(jq --raw-output '.release.id' "$GITHUB_EVENT_PATH")
fi

# For each matching file..
for file in $*; do
for file in $1; do

echo "Processing file ${file}"

Expand Down
0