Skip to content

Rearrange caching

Rearrange caching #209

Workflow file for this run

name: Build Service
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
packages: write
jobs:
check:
uses: ./.github/workflows/check.yml
build:
needs: [ check ]
runs-on: ubuntu-latest
steps:
- name: Correct env
run: echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
- name: Check out code into the proper directory
uses: actions/checkout@v4
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build container
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ghcr.io/${{ env.REPO }}:latest
platforms: linux/amd64
cache-from: type=gha
cache-to: type=gha,mode=max