Skip to content

Commit

Permalink
feat: disable dockerhub upload except for tags (#614)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlwn123 authored Feb 10, 2025
1 parent f91234f commit 62f00ab
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/fedimint-ui-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,13 @@ jobs:
images: |
fedimintui/fedimint-ui
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/v') }}
type=semver,pattern={{version}},enable=${{ startsWith(github.ref, 'refs/tags/v') }}
type=semver,pattern={{major}}.{{minor}},enable=${{ startsWith(github.ref, 'refs/tags/v') }}
type=sha
- name: Login to Docker Hub
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')
if: startsWith(github.ref, 'refs/tags/v')
uses: docker/login-action@v2
with:
username: fedimintui
Expand All @@ -42,17 +41,17 @@ jobs:
uses: docker/build-push-action@v4
with:
file: Dockerfile
push: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v') }}
push: ${{ startsWith(github.ref, 'refs/tags/v') }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Checkout repository content
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/checkout@v4

# This workflow requires the repository content to be locally available to read the README
- name: Update the Docker Hub description
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')
if: startsWith(github.ref, 'refs/tags/v')
uses: peter-evans/dockerhub-description@v3
with:
username: fedimintui
Expand Down

0 comments on commit 62f00ab

Please sign in to comment.