Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 16 additions & 17 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,23 @@ env:
jobs:
build-docker:
runs-on:
- self-hosted
- Linux
- ${{ matrix.runner }}

- codebuild-defguard-gateway-runner-${{ github.run_id }}-${{ github.run_attempt }}
image:${{ matrix.os }}
instance-size:${{ matrix.size }}
strategy:
matrix:
cpu: [arm64, amd64, arm/v7]
include:
- cpu: arm64
runner: ARM64
- os: arm-3.0
size: xlarge
cpu: arm64
tag: arm64
- cpu: amd64
runner: X64
- os: ubuntu-7.0
size: xlarge
cpu: amd64
tag: amd64
- cpu: arm/v7
runner: ARM
- os: arm-3.0
size: xlarge
cpu: arm/v7
tag: armv7

permissions:
Expand All @@ -55,10 +56,6 @@ jobs:

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
buildkitd-config-inline: |
[registry."docker.io"]
mirrors = ["dockerhub-proxy.teonite.net"]

- name: Build container
uses: docker/build-push-action@v5
Expand All @@ -68,8 +65,10 @@ jobs:
provenance: false
push: true
tags: "${{ env.GHCR_REPO }}:${{ github.sha }}-${{ matrix.tag }}"
cache-from: type=gha
cache-to: type=gha,mode=max
cache-from: |
type=registry,ref=${{ env.GHCR_REPO }}:cache-${{ matrix.tag }}
type=registry,ref=${{ env.GHCR_REPO }}:cache-${{ matrix.tag }}-${{ github.ref_name }}
cache-to: type=registry,mode=max,ref=${{ env.GHCR_REPO }}:cache-${{ matrix.tag }}-${{ github.ref_name }}

- name: Scan image with Trivy
uses: aquasecurity/trivy-action@0.32.0
Expand Down