Skip to content

ci: try to improve cache performance #7

ci: try to improve cache performance

ci: try to improve cache performance #7

Workflow file for this run

name: Build current image
on:
push:
branches:
- main
- dev
paths-ignore:
- '*.md'
- 'LICENSE'
pull_request:
branches:
- main
- dev
paths-ignore:
- '*.md'
- 'LICENSE'
jobs:
publish:
runs-on: self-hosted
strategy:
fail-fast: false
matrix:
platform:
- linux/amd64
- linux/arm/v7
- linux/arm64
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/defguard/gateway
tags: |
type=ref,event=branch
type=raw,value=current
type=sha
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build container
uses: docker/build-push-action@v4
with:
context: .
platforms: ${{ matrix.platform }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max