Skip to content

Commit 0dad509

Browse files
committed
Update CI to deduplicate steps (don't build and push twice per version) and if on main, push to Docker Hub
1 parent 6164bcf commit 0dad509

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

.github/workflows/continuous-integration-workflow.yml

+15-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
name: Build and Test
2-
3-
on:
4-
[push, pull_request]
5-
1+
name: CI
2+
on: push
63
jobs:
74
ci:
85
runs-on: ubuntu-latest
@@ -91,3 +88,16 @@ jobs:
9188
env:
9289
CI_VERSION: ${{ matrix.version }}
9390
SKIP_CLEANUP: 1
91+
92+
- name: Login to Docker Hub
93+
if: ${{ github.ref == 'refs/heads/main' }}
94+
uses: docker/login-action@v3
95+
with:
96+
username: ${{ vars.DOCKER_HUB_USERNAME }}
97+
password: ${{ secrets.DOCKER_HUB_PERSONAL_ACCESS_TOKEN }}
98+
99+
- name: Push Docker image
100+
if: ${{ github.ref == 'refs/heads/main' }}
101+
run: ./push.sh
102+
env:
103+
CI_VERSION: ${{ matrix.version }}

0 commit comments

Comments
 (0)