Skip to content

Docker

Docker #10

Workflow file for this run

name: Docker
on: [create, workflow_dispatch]
env:
GHCR_SLUG: ghcr.io/${{ github.repository }}
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
php: ["8.1"]
name: Build on PHP ${{ matrix.php }} ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
${{ env.GHCR_SLUG }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
labels: |
org.opencontainers.image.title=Chevereto V4
org.opencontainers.image.description=Chevereto V4
org.opencontainers.image.vendor=Chevereto
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Prepare Chevereto
run: mkdir -p ./chevereto
- name: Build
uses: docker/bake-action@v2
with:
set: build.args.PHP=${{ matrix.php }}
files: |
./docker-bake.hcl
${{ steps.meta.outputs.bake-file }}
targets: build
push: true
- name: Check manifest
run: |
docker buildx imagetools inspect ${{ env.GHCR_SLUG }}:${{ steps.meta.outputs.version }}
- name: Inspect image
run: |
docker pull ${{ env.GHCR_SLUG }}:${{ steps.meta.outputs.version }}
docker image inspect ${{ env.GHCR_SLUG }}:${{ steps.meta.outputs.version }}