Skip to content

Commit

Permalink
ci: only push to dockerhub on git tag with additional 'latest' tag (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
paoloyx authored Jul 3, 2024
1 parent 7b5f6b5 commit 509c2b2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/api-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,12 @@ jobs:
if: github.event_name != 'pull_request'
uses: radicalbit/radicalbit-github-workflows/.github/workflows/docker.yaml@v1
with:
push: ${{ github.event_name != 'pull_request' }}
push: ${{ startsWith(github.ref, 'refs/tags/v') }}
context: ./api
image: radicalbit-ai-monitoring-api
tag: ${{ startsWith(github.ref, 'refs/tags/v') && github.ref_name || 'latest' }}
tag: github.ref_name
dockerhub_shortdesc: "Radicalbit AI Monitoring - backend API"
dockerhub_push_latest: true
secrets:
USERNAME: ${{ secrets.DOCKER_HUB_USER }}
PASSWORD: ${{ secrets.DOCKER_HUB_PAT }}
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/migrations-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,13 @@ jobs:
if: github.event_name != 'pull_request'
uses: radicalbit/radicalbit-github-workflows/.github/workflows/docker.yaml@v1
with:
push: ${{ github.event_name != 'pull_request' }}
push: ${{ startsWith(github.ref, 'refs/tags/v') }}
context: ./api
dockerfile: migrations.Dockerfile
image: radicalbit-ai-monitoring-migrations
tag: ${{ startsWith(github.ref, 'refs/tags/v') && github.ref_name || 'latest' }}
tag: github.ref_name
dockerhub_shortdesc: "Radicalbit AI Monitoring - database migrations"
dockerhub_push_latest: true
secrets:
USERNAME: ${{ secrets.DOCKER_HUB_USER }}
PASSWORD: ${{ secrets.DOCKER_HUB_PAT }}
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/spark-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,12 @@ jobs:
if: github.event_name != 'pull_request'
uses: radicalbit/radicalbit-github-workflows/.github/workflows/docker.yaml@v1
with:
push: ${{ github.event_name != 'pull_request' }}
push: ${{ startsWith(github.ref, 'refs/tags/v') }}
context: ./spark
image: radicalbit-spark-py
tag: ${{ startsWith(github.ref, 'refs/tags/v') && github.ref_name || 'latest' }}
tag: github.ref_name
dockerhub_shortdesc: "Radicalbit AI Monitoring - Apache Spark jobs"
dockerhub_push_latest: true
secrets:
USERNAME: ${{ secrets.DOCKER_HUB_USER }}
PASSWORD: ${{ secrets.DOCKER_HUB_PAT }}
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/ui-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@ jobs:
if: github.event_name != 'pull_request'
uses: radicalbit/radicalbit-github-workflows/.github/workflows/docker.yaml@v1
with:
push: ${{ github.event_name != 'pull_request' }}
push: ${{ startsWith(github.ref, 'refs/tags/v') }}
context: ./ui
image: radicalbit-ai-monitoring-ui
tag: ${{ startsWith(github.ref, 'refs/tags/v') && github.ref_name || 'latest' }}
tag: github.ref_name
dockerhub_shortdesc: "Radicalbit AI Monitoring - frontend UI"
dockerhub_push_latest: true
secrets:
USERNAME: ${{ secrets.DOCKER_HUB_USER }}
PASSWORD: ${{ secrets.DOCKER_HUB_PAT }}
Expand Down

0 comments on commit 509c2b2

Please sign in to comment.