Add conditional checks for pull request events in Docker metadata extraction and image build steps
This commit is contained in:
parent
1e515a8394
commit
10408c2fa7
1 changed files with 2 additions and 0 deletions
2
.github/workflows/docker-publish.yml
vendored
2
.github/workflows/docker-publish.yml
vendored
|
|
@ -40,12 +40,14 @@ jobs:
|
||||||
# Extract metadata (tags, labels) from Git reference and GitHub events for Docker
|
# Extract metadata (tags, labels) from Git reference and GitHub events for Docker
|
||||||
- id: meta
|
- id: meta
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
with:
|
with:
|
||||||
images: ghcr.io/thelovinator1/anewdawn
|
images: ghcr.io/thelovinator1/anewdawn
|
||||||
tags: type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
|
tags: type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
|
||||||
|
|
||||||
# Build and push the Docker image
|
# Build and push the Docker image
|
||||||
- uses: docker/build-push-action@v6
|
- uses: docker/build-push-action@v6
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue