Skip to content

Commit

Permalink
Run only the amd64 build in pull request
Browse files Browse the repository at this point in the history
  • Loading branch information
MattKetmo committed Sep 14, 2023
1 parent 90a5a4f commit 841badd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,17 @@ jobs:
packages: write

strategy:
fail-fast: false
matrix:
os: [linux]
arch: [amd64, arm64]

# Run only the amd64 build in pull request
is_pr: ["${{github.event_name == 'pull_request'}}"]
exclude:
- is_pr: true
include:
- arch: amd64

steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -104,6 +110,4 @@ jobs:
cache-from: type=gha,scope=${{ matrix.os }}/${{ matrix.arch }}
cache-to: type=gha,mode=max,scope=${{ matrix.os }}/${{ matrix.arch }}
build-args: |
GOOS=${{ matrix.os }}
GOARCH=${{ matrix.arch }}
VERSION=${{ env.VERSION }}
4 changes: 0 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# Builder
FROM golang:1.20-alpine3.18 as builder

ARG GOOS
ENV GOOS=$GOOS
ARG GOARCH
ENV GOARCH=$GOARCH
ARG VERSION="0.0.0-build"
ENV VERSION=$VERSION

Expand Down

0 comments on commit 841badd

Please sign in to comment.