File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -16,22 +16,24 @@ jobs:
1616 steps :
1717 - uses : actions/checkout@v5
1818
19- - name : Get branch name
20- id : get-branch-name
19+ - name : get tag
20+ id : get-tag
2121 run : |
2222 if [ "${{ github.event_name }}" == "pull_request" ]; then
23- echo "BRANCH_NAME=$(${{ github.event.pull_request.title }} | sed -e 's/ /-/g')" >> $GITHUB_OUTPUT
23+ PR_TITLE = ${{ github.event.pull_request.title }}
24+ PR_TAG = $(${PR_TITLE} | sed -e 's/ /-/g')
25+ echo "TAG=${PR_TAG}-${{ github.sha }}" >> $GITHUB_OUTPUT
2426 else
25- echo "BRANCH_NAME =${GITHUB_REF##*/}" >> $GITHUB_OUTPUT
27+ echo "TAG =${GITHUB_REF##*/}-${{ github.sha } }" >> $GITHUB_OUTPUT
2628 fi
2729 shell : bash
2830
2931 - name : run make docker-build
3032 run : make docker-build
3133 env :
32- TAG : ${{ steps.get-branch-name .outputs.BRANCH_NAME }}-${{ github.sha }}
34+ TAG : ${{ steps.get-tag .outputs.TAG }}
3335
3436 - name : run make docker-push
3537 run : make docker-push
3638 env :
37- TAG : ${{ steps.get-branch-name .outputs.BRANCH_NAME }}-${{ github.sha }}
39+ TAG : ${{ steps.get-tag .outputs.TAG }}
You can’t perform that action at this time.
0 commit comments