forked from abner/for-legacy-web
[chore] Trigger workflow on PR close.
Some checks failed
Docker / publish (pull_request) Failing after 9m35s
Some checks failed
Docker / publish (pull_request) Failing after 9m35s
This commit is contained in:
12
.github/workflows/docker.yml
vendored
12
.github/workflows/docker.yml
vendored
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user