Skip to content

Commit

Permalink
Update CI to deduplicate steps (don't build and push twice per versio…
Browse files Browse the repository at this point in the history
…n) and if on main, push to Docker Hub
  • Loading branch information
GeoffreyBooth committed Feb 9, 2025
1 parent 6164bcf commit 0dad509
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/continuous-integration-workflow.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
name: Build and Test

on:
[push, pull_request]

name: CI
on: push
jobs:
ci:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -91,3 +88,16 @@ jobs:
env:
CI_VERSION: ${{ matrix.version }}
SKIP_CLEANUP: 1

- name: Login to Docker Hub
if: ${{ github.ref == 'refs/heads/main' }}
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PERSONAL_ACCESS_TOKEN }}

- name: Push Docker image
if: ${{ github.ref == 'refs/heads/main' }}
run: ./push.sh
env:
CI_VERSION: ${{ matrix.version }}

0 comments on commit 0dad509

Please sign in to comment.