Skip to content

Commit 34d4b07

Browse files
expand the number of platforms + remove pull_request event
1 parent bb6f3d9 commit 34d4b07

1 file changed

Lines changed: 4 additions & 10 deletions

File tree

.github/workflows/ghcr-publish.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,9 @@ name: Publish to ghcr
44
# @ see: https://docs.docker.com/build/ci/github-actions/multi-platform/#distribute-build-across-multiple-runners
55

66
on:
7-
# schedule:
8-
# - cron: '18 10 * * *'
97
push:
108
branches: ["main"]
11-
# Publish semver tags as releases.
129
tags: ["v*.*.*"]
13-
pull_request:
14-
branches: ["main"]
1510

1611
env:
1712
# Use docker.io for Docker Hub if empty
@@ -30,6 +25,8 @@ jobs:
3025
matrix:
3126
platform:
3227
- linux/amd64
28+
- linux/arm/v6
29+
- linux/arm/v7
3330
- linux/arm64
3431

3532
steps:
@@ -54,7 +51,6 @@ jobs:
5451
# Install the cosign tool except on PR
5552
# https://github.com/sigstore/cosign-installer
5653
- name: Install cosign
57-
if: github.event_name != 'pull_request'
5854
uses: sigstore/cosign-installer@v3.5.0
5955
with:
6056
cosign-release: "v2.2.4"
@@ -64,17 +60,17 @@ jobs:
6460

6561
- name: Login to GitHub Packages Docker Registry
6662
uses: docker/login-action@v3
67-
if: github.event_name != 'pull_request'
6863
with:
6964
registry: ghcr.io
7065
username: ${{ github.actor }}
7166
password: ${{ secrets.GITHUB_TOKEN }}
7267

73-
- name: Build and push Docker image
68+
- name: Build Docker image
7469
id: build
7570
uses: docker/build-push-action@v6
7671
with:
7772
context: .
73+
tags: ${{ steps.meta.outputs.tags }}
7874
labels: ${{ steps.meta.outputs.labels }}
7975
cache-from: type=gha
8076
cache-to: type=gha,mode=max
@@ -101,7 +97,6 @@ jobs:
10197
# transparency data even for private images, pass --force to cosign below.
10298
# https://github.com/sigstore/cosign
10399
- name: Sign the published Docker image
104-
if: ${{ github.event_name != 'pull_request' }}
105100
env:
106101
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
107102
TAGS: ${{ steps.meta.outputs.tags }}
@@ -114,7 +109,6 @@ jobs:
114109
runs-on: ubuntu-latest
115110
permissions:
116111
packages: write
117-
if: github.event_name != 'pull_request'
118112
needs:
119113
- build
120114
steps:

0 commit comments

Comments
 (0)