Skip to content

Commit

Permalink
fix(docker): run docker.yml on release published
Browse files Browse the repository at this point in the history
This is what I wanted to do first, let's see what docker-metadata says.
  • Loading branch information
pbrisbin committed Jan 29, 2025
1 parent 7a16e91 commit 94f31a8
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@ name: Docker
on:
pull_request:

push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+.[0-9]+' # PVP version
release:
types: [published]

jobs:
docker:
runs-on: ubuntu-latest
steps:
# Only log in if we're going to push
- if: ${{ github.event_name == 'push' }}
- if: ${{ github.event_name == 'release' }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
Expand All @@ -30,7 +29,7 @@ jobs:
cache-to: type=gha,mode=max
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
push: ${{ github.event_name == 'push' }}
push: ${{ github.event_name == 'release' }}

hadolint:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 94f31a8

Please sign in to comment.