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