Skip to content

Build

Build #145

Workflow file for this run

name: Build
on:
push:
branches:
- master
tags-ignore:
- '**'
schedule:
- cron: 0 0 * * 1
workflow_dispatch:
jobs:
docker:
permissions:
contents: read
packages: write
id-token: write
strategy:
matrix:
version: [ "8.0", "8.1", "8.2", "8.3" ]
fail-fast: false
name: docker build ${{ matrix.version }}
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Setup depot CLI
uses: depot/setup-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to GitLab
uses: docker/login-action@v2
with:
registry: registry.gitlab.com
username: ${{ secrets.GITLAB_USERNAME }}
password: ${{ secrets.GITLAB_PASSWORD }}
- name: Run docker build
uses: depot/build-push-action@v1
with:
push: true
file: ${{ matrix.version }}.Dockerfile
tags: |
stayallive/php:${{ matrix.version }}
ghcr.io/stayallive/php:${{ matrix.version }}
registry.gitlab.com/stayallive/php:${{ matrix.version }}
context: .
platforms: |
linux/amd64
linux/arm64