Build docker image #235
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build docker image | |
on: | |
schedule: | |
- cron: '4 0 * * *' | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- images/* | |
permissions: | |
contents: read | |
id-token: write | |
packages: write | |
env: | |
COSIGN_EXPERIMENTAL: 1 | |
jobs: | |
base: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Cosign | |
uses: sigstore/cosign-installer@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login into Github Docker Registery | |
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
- uses: docker/build-push-action@v6 | |
with: | |
tags: ghcr.io/shyim/wolfi-php/base:latest | |
platforms: linux/amd64,linux/arm64 | |
context: images/base | |
push: true | |
provenance: false | |
- name: Sign image | |
run: cosign sign --yes ghcr.io/shyim/wolfi-php/base:latest | |
frankenphp: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php: | |
- 8.2 | |
- 8.3 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Cosign | |
uses: sigstore/cosign-installer@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login into Github Docker Registery | |
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
- uses: docker/build-push-action@v6 | |
with: | |
tags: ghcr.io/shyim/wolfi-php/frankenphp:${{ matrix.php }} | |
platforms: linux/amd64,linux/arm64 | |
context: images/frankenphp | |
build-args: PHP_VERSION=${{ matrix.php }} | |
push: true | |
provenance: false | |
- name: Sign image | |
run: cosign sign --yes ghcr.io/shyim/wolfi-php/frankenphp:${{ matrix.php }} | |
fpm: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php: | |
- 8.2 | |
- 8.3 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Cosign | |
uses: sigstore/cosign-installer@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login into Github Docker Registery | |
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
- uses: docker/build-push-action@v6 | |
with: | |
tags: ghcr.io/shyim/wolfi-php/fpm:${{ matrix.php }} | |
platforms: linux/amd64,linux/arm64 | |
context: images/fpm | |
build-args: PHP_VERSION=${{ matrix.php }} | |
push: true | |
provenance: false | |
- name: Sign image | |
run: cosign sign --yes ghcr.io/shyim/wolfi-php/fpm:${{ matrix.php }} | |
nginx: | |
runs-on: ubuntu-latest | |
needs: fpm | |
strategy: | |
matrix: | |
php: | |
- 8.2 | |
- 8.3 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Cosign | |
uses: sigstore/cosign-installer@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login into Github Docker Registery | |
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
- uses: docker/build-push-action@v6 | |
with: | |
tags: ghcr.io/shyim/wolfi-php/nginx:${{ matrix.php }} | |
platforms: linux/amd64,linux/arm64 | |
context: images/nginx | |
build-args: PHP_VERSION=${{ matrix.php }} | |
push: true | |
provenance: false | |
- name: Sign image | |
run: cosign sign --yes ghcr.io/shyim/wolfi-php/nginx:${{ matrix.php }} | |
caddy: | |
runs-on: ubuntu-latest | |
needs: fpm | |
strategy: | |
matrix: | |
php: | |
- 8.2 | |
- 8.3 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Cosign | |
uses: sigstore/cosign-installer@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login into Github Docker Registery | |
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
- uses: docker/build-push-action@v6 | |
with: | |
tags: ghcr.io/shyim/wolfi-php/caddy:${{ matrix.php }} | |
platforms: linux/amd64,linux/arm64 | |
context: images/caddy | |
build-args: PHP_VERSION=${{ matrix.php }} | |
push: true | |
provenance: false | |
- name: Sign image | |
run: cosign sign --yes ghcr.io/shyim/wolfi-php/caddy:${{ matrix.php }} | |