From ead5fb431a50fce5cf8e6e541879996fb12e679d Mon Sep 17 00:00:00 2001 From: jmug Date: Wed, 4 Mar 2026 14:05:26 +0000 Subject: [PATCH] [chore] Trigger workflow on PR close. (#3) Co-authored-by: jmug Reviewed-on: https://git.handmadecities.com/HMC/handmade-revolt/pulls/3 --- .github/workflows/docker.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 9682bbdc..3dcd1814 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -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 }}