Skip to content

Commit

Permalink
Remove 'Build and Publish Docker Image' from PR actions
Browse files Browse the repository at this point in the history
  • Loading branch information
PlagueCZ committed May 29, 2024
1 parent 1e75d00 commit 42528ad
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Build and Publish Docker Image

env:
platforms: ${{ (github.event_name == 'pull_request' && 'linux/amd64') || 'linux/amd64,linux/arm64' }}
platforms: ${{ 'linux/amd64,linux/arm64' }}

on:
push:
Expand All @@ -12,10 +12,6 @@ on:
paths-ignore:
- 'docs/**'
- '**/*.md'
pull_request:
paths-ignore:
- 'docs/**'
- '**/*.md'
workflow_dispatch:
inputs:
platforms:
Expand All @@ -29,7 +25,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'release' && github.ref || github.event_name == 'push' && github.ref || github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.event_name == 'pull_request' && github.event.pull_request.head.ref }}
ref: ${{ github.event_name == 'release' && github.ref || github.event_name == 'push' && github.ref }}
- uses: docker/metadata-action@v5
id: meta
with:
Expand Down Expand Up @@ -64,7 +60,6 @@ jobs:
version: latest
endpoint: ${{ env.CONTEXT_NAME }} # self-hosted
- name: Login to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
Expand All @@ -76,7 +71,7 @@ jobs:
with:
context: .
platforms: ${{env.platforms}}
push: ${{ github.event_name != 'pull_request' && github.event_name != 'workflow_dispatch' }}
push: ${{ github.event_name != 'workflow_dispatch' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
target: production
Expand Down

0 comments on commit 42528ad

Please sign in to comment.