Skip to content

Commit

Permalink
Merge pull request #1 from arunalakmal/change_event_type_tag
Browse files Browse the repository at this point in the history
changing eventype to tag
  • Loading branch information
arunalakmal authored Jan 20, 2023
2 parents 903fb30 + 2d48c4e commit 7a295a2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ inputs:
image:
description: "Image Name"
required: true
event_type:
description: "GitHub trigger event type"
tag:
description: "Image Tag"
required: true
version:
description: "Kustomize version"
Expand All @@ -21,5 +21,5 @@ runs:
steps:
- run: echo "${{ github.action_path }}" >> $GITHUB_PATH
shell: bash
- run: execute_action.sh ${{ inputs.bot_name }} ${{ inputs.path }} ${{ inputs.image }} ${{ inputs.event_type }} ${{ inputs.version }}
- run: execute_action.sh ${{ inputs.bot_name }} ${{ inputs.path }} ${{ inputs.image }} ${{ inputs.tag }} ${{ inputs.version }}
shell: bash
4 changes: 2 additions & 2 deletions execute_action.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
BOT_NAME=$1
FOLDER_PATH=$2
IMG=$3
EVENT_TYPE=$4
TAG=$4
VERSION=$5 #v4.5.7

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$(pwd)
Expand All @@ -13,7 +13,7 @@ function kustomize_set_image {
git config --global user.email "${BOT_NAME}@email.com"
git pull
pushd ${FOLDER_PATH}
kustomize edit set image ${IMG}:${EVENT_TYPE}
kustomize edit set image ${IMG}:${TAG}
popd
git add .
git commit -m "Image updated"
Expand Down

0 comments on commit 7a295a2

Please sign in to comment.