Skip to content

Commit 3654687

Browse files
committed
Fixes to CI build
1 parent 04201c4 commit 3654687

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

.github/workflows/create-dev-image.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,18 @@ jobs:
1818
username: ${{ secrets.DOCKERHUB_USERNAME }}
1919
password: ${{ secrets.DOCKERHUB_TOKEN }}
2020

21+
- name: Set image tag vars
22+
run: |
23+
echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_ENV
24+
NAME=${GITHUB_REF_NAME#release/}
25+
NAME=${NAME//\//-}
26+
echo "BRANCH_TAG=$NAME" >> $GITHUB_ENV
27+
2128
- name: Build and push
2229
uses: docker/build-push-action@v5
2330
with:
2431
context: .
2532
push: true
2633
tags: |
27-
duplicati/console-ingress:$(echo $GITHUB_SHA | head -c7)
34+
duplicati/console-ingress:${{ env.SHORT_SHA }}
2835
duplicati/console-ingress:dev-latest

.github/workflows/create-prod-image.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,19 @@ jobs:
2424
username: ${{ secrets.DOCKERHUB_USERNAME }}
2525
password: ${{ secrets.DOCKERHUB_TOKEN }}
2626

27+
- name: Set image tag vars
28+
run: |
29+
echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_ENV
30+
NAME=${GITHUB_REF_NAME#release/}
31+
NAME=${NAME//\//-}
32+
echo "BRANCH_TAG=$NAME" >> $GITHUB_ENV
33+
2734
- name: Build and push
2835
uses: docker/build-push-action@v5
2936
with:
3037
context: .
3138
push: true
3239
tags: |
33-
duplicati/console-ingress:$(echo $GITHUB_SHA | head -c7)
40+
duplicati/console-ingress:${{ env.SHORT_SHA }}
3441
duplicati/console-ingress:latest
35-
duplicati/console-ingress:$(echo ${GITHUB_REF_NAME#release/})
42+
duplicati/console-ingress:${{ env.BRANCH_TAG }}

0 commit comments

Comments
 (0)