From 841baddcc94594d9a2e2c56daae24a867503317c Mon Sep 17 00:00:00 2001 From: Matthieu Moquet Date: Thu, 14 Sep 2023 21:47:45 +0200 Subject: [PATCH] Run only the amd64 build in pull request --- .github/workflows/docker.yaml | 10 +++++++--- Dockerfile | 4 ---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index c7bef01..1764da5 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -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 @@ -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 }} diff --git a/Dockerfile b/Dockerfile index 07c4f55..621c105 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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