Skip to content

Build Docker Image #114

Build Docker Image

Build Docker Image #114

Workflow file for this run

name: Build Docker Image
on:
push:
paths:
- .github/workflows/build.yml
- build-base.sh
- Dockerfile
- wolfi-base.yaml
schedule:
- cron: '5 3 * * *'
workflow_dispatch:
permissions:
contents: read
packages: write
jobs:
base:
runs-on: ubuntu-latest
steps:
- name: Clone
uses: actions/checkout@v4
- name: Login into Github Docker Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Login into Docker Hub
run: echo "${{ secrets.DOCKER_HUB_PAT }}" | docker login -u marcusmu --password-stdin
- name: Build base and push
run: ./build-base.sh
fink:
needs: [base]
runs-on: ubuntu-latest
steps:
- name: Get latest PHP Mess Detector version
id: fink_version
run: |
VERSION=$(curl https://api.github.com/repos/dantleech/fink/releases/latest | jq '.tag_name | ltrimstr("v")' -r)
echo "FINK_VERSION=${VERSION}" >> "$GITHUB_OUTPUT"
echo "FINK_VERSION=${VERSION}" >> "$GITHUB_ENV"
- name: Login into Github Docker Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Login into Docker Hub
run: echo "${{ secrets.DOCKER_HUB_PAT }}" | docker login -u marcusmu --password-stdin
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
platforms: linux/amd64,linux/arm64
build-args: |
PHP_FINK_VERSION=${{ steps.fink_version.outputs.FINK_VERSION }}
tags: |
marcusmu/php-fink:latest
marcusmu/php-fink:${{ steps.fink_version.outputs.FINK_VERSION }}
ghcr.io/m-arcus/php-fink:latest
ghcr.io/m-arcus/php-fink:${{ steps.fink_version.outputs.FINK_VERSION }}