77 lines
2.0 KiB
YAML
77 lines
2.0 KiB
YAML
name: buildx
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
GHCR_SLUG: ghcr.io/rodber/chevereto-free-httpd-php
|
|
|
|
jobs:
|
|
buildx:
|
|
runs-on: ubuntu-20.04
|
|
strategy:
|
|
matrix:
|
|
operating-system: [ubuntu-latest]
|
|
php-versions: ["8.0"]
|
|
name: Build on PHP ${{ matrix.php-versions }} ${{ matrix.operating-system }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup PHP
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: ${{ matrix.php-versions }}
|
|
env:
|
|
fail-fast: true
|
|
|
|
# - name: Build
|
|
# run: php src/build.php
|
|
|
|
- name: Docker meta
|
|
id: meta
|
|
uses: docker/metadata-action@v3
|
|
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-Free
|
|
org.opencontainers.image.description=Chevereto-Free Image Hosting
|
|
org.opencontainers.image.vendor=rodber
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v1
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
- name: Login to GHCR
|
|
uses: docker/login-action@v1
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Build
|
|
uses: docker/bake-action@v1
|
|
with:
|
|
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 }}
|