[chore] Trigger workflow on PR close. (#3)

Co-authored-by: jmug <u.g.a.mariano@gmail.com>
Reviewed-on: #3
This commit was merged in pull request #3.
This commit is contained in:
2026-03-04 14:05:26 +00:00
parent 52980560dd
commit ead5fb431a

View File

@@ -2,8 +2,9 @@ name: Docker
on:
push:
branches:
- "handmade"
# TODO: Bring back branch push once gitea is updated past 1.21
# branches:
# - "handmade"
tags:
- "*"
# TODO: Bring back once gitea is updated past 1.21
@@ -18,6 +19,7 @@ on:
pull_request:
branches:
- "handmade"
types: [opened, synchronize, reopened, closed]
# TODO: Bring back once gitea is updated past 1.21
# paths-ignore:
# - ".github/**"
@@ -33,8 +35,6 @@ on:
jobs:
publish:
runs-on: ubuntu-latest
# NOTE: Running on pull requests for now, but without pushing.
# if: github.event_name != 'pull_request'
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -53,7 +53,7 @@ jobs:
DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index
- name: Login to DockerHub
uses: docker/login-action@v1
if: github.event_name != 'pull_request'
if: github.event_name != 'pull_request' || github.event.pull_request.merged == true
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -61,7 +61,7 @@ jobs:
uses: docker/build-push-action@v6
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
push: ${{ github.event_name != 'pull_request' || github.event.pull_request.merged == true }}
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
annotations: ${{ steps.meta.outputs.annotations }}