Skip to content

Commit c501686

Browse files
Update Docker Image CI workflow to support both main and develop branches (#606)
1 parent e56b544 commit c501686

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

.github/workflows/docker-image.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
name: Docker Image CI
2-
3-
env:
4-
TAG: 'latest'
52

63
on:
74
push:
8-
branches: [ "main" ]
5+
branches: [ "main", "develop" ]
96
workflow_dispatch:
107

118
jobs:
@@ -14,10 +11,16 @@ jobs:
1411

1512
runs-on: ubuntu-latest
1613
name: Build image
17-
18-
steps:
14+
steps:
1915
- name: Checkout
2016
uses: actions/checkout@v4
17+
- name: Set TAG environment variable
18+
run: |
19+
if [ "${{ github.ref_name }}" = "main" ]; then
20+
echo "TAG=latest" >> $GITHUB_ENV
21+
else
22+
echo "TAG=develop" >> $GITHUB_ENV
23+
fi
2124
- name: Set up QEMU
2225
uses: docker/setup-qemu-action@v3
2326
- name: Buildx

0 commit comments

Comments
 (0)