Skip to content

Fix CI

Fix CI #40

Workflow file for this run

name: publish
on:
push:
branches: [ "develop" ]
tags: [ 'v*' ]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
base:
runs-on: ubuntu-22.04
services:
registry:
image: registry:2
ports:
- 5000:5000
strategy:
matrix:
service: ["errorpages", "home", "web", "well-known"]
permissions:
contents: read
packages: write
steps:
- name: checkout repository
uses: actions/checkout@v3
- name: setup docker buildx
uses: docker/setup-buildx-action@v2
with:
driver-opts: network=host
- name: log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: build base image and push to local registry
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: localhost:5000/local/base_image
cache-from: type=gha
cache-to: type=gha,mode=max
- name: extract docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/${{ matrix.service }}
- name: build and push image
uses: docker/build-push-action@v4
with:
context: ${{ matrix.service }}
build-contexts: |
base_image=docker-image://localhost:5000/local/base_image
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max