-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add action to determine docekr image tag name and fix helm workflow
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
- Loading branch information
Showing
4 changed files
with
61 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: "Determine Docker image tag" | ||
description: "Determine Docker image tag" | ||
|
||
outputs: | ||
PRIMARY_TAG: | ||
description: "primary tag" | ||
value: ${{ steps.determine_tag_name.outputs.PRIMARY_TAG }} | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Determine tag name | ||
shell: bash | ||
id: determine_tag_name | ||
run: | | ||
echo "GITHUB_REF $GITHUB_REF" | ||
echo "GITHUB_EVENT_PATH $GITHUB_EVENT_PATH" | ||
echo "GITHUB_EVENT_NAME ${{ github.event_name }}" | ||
echo "GITHUB_EVENT_NUMBER ${{ github.event.number }}" | ||
if [[ "$GITHUB_REF" =~ ^refs/tags/.* ]]; then | ||
tag_name=`echo $GITHUB_REF | sed -e 's:^refs/tags/::'` | ||
primary_tag="${tag_name}" | ||
elif [ "${{ github.event_name }}" = "pull_request" ]; then | ||
pr_num=`cat $GITHUB_EVENT_PATH | jq -r ".number"` | ||
echo "PR-${pr_num}" > versions/VALD_VERSION | ||
primary_tag="pr-${pr_num}" | ||
elif [ "${{ github.event_name }}" = "pull_request_target" ]; then | ||
pr_num=`cat $GITHUB_EVENT_PATH | jq -r ".number"` | ||
echo "PR-${pr_num}" > versions/VALD_VERSION | ||
primary_tag="pr-${pr_num}" | ||
elif [ "$GITHUB_REF" = "refs/heads/main" ]; then | ||
echo "nightly" > versions/VALD_VERSION | ||
primary_tag="nightly" | ||
else | ||
primary_tag="unknown" | ||
fi | ||
echo "PRIMARY_TAG is determined: ${primary_tag}" | ||
echo "PRIMARY_TAG=${primary_tag}" >> $GITHUB_OUTPUT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters