File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change 77 pull_request :
88
99env :
10- TAG : ${{ github.ref_name }}
1110 IMAGE_NAME : image-builder
12- REGISTRY : ghcr.io/elastisys
11+ REGISTRY : ghcr.io/elastisys
1312
1413jobs :
1514 build-image-builder :
1615 runs-on : ubuntu-24.04
1716 steps :
1817 - uses : actions/checkout@v5
1918
19+ - name : Get branch name
20+ id : get-branch-name
21+ run : |
22+ if [ "${{ github.event_name }}" == "pull_request" ]; then
23+ echo "BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_OUTPUT
24+ else
25+ echo "BRANCH_NAME=${GITHUB_REF##*/}" >> $GITHUB_OUTPUT
26+ fi
27+ shell : bash
28+
2029 - name : run make docker-build
2130 run : make docker-build
31+ env :
32+ TAG : ${{ steps.get-branch-name.outputs.BRANCH_NAME }}-${{ github.sha }}
2233
2334 - name : run make docker-push
2435 run : make docker-push
25-
36+ env :
37+ TAG : ${{ steps.get-branch-name.outputs.BRANCH_NAME }}-${{ github.sha }}
You can’t perform that action at this time.
0 commit comments