CI #77
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
schedule: | |
- cron: '30 5 * * 1' | |
# TODO: Split this into separate workflows | |
jobs: | |
build: | |
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }} | |
name: 'build' | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build container image | |
uses: dagger/dagger-for-github@v5 | |
with: | |
version: '0.10.2' | |
cloud-token: ${{ secrets.DAGGER_CLOUD_TOKEN }} | |
verb: call | |
module: '.' | |
args: 'build-containers-for-current-versions --flavours="apache" --php-versions="8.2" --arches="linux/amd64,linux/arm64" sync' | |
build-and-push-auto: | |
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} | |
runs-on: ubuntu-22.04 | |
env: | |
CI_REGISTRY_TOKEN: ${{ secrets.CI_REGISTRY_TOKEN }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build and push container image | |
uses: dagger/dagger-for-github@v5 | |
with: | |
version: '0.10.2' | |
cloud-token: ${{ secrets.DAGGER_CLOUD_TOKEN }} | |
verb: call | |
module: '.' | |
args: >- | |
with-registry-auth \ | |
--address="${{ vars.CI_REGISTRY_ADDRESS }}" \ | |
--username="${{ vars.CI_REGISTRY_USER }}" \ | |
--secret="env:CI_REGISTRY_TOKEN" \ | |
with-containers-for-current-versions \ | |
--flavours="apache" \ | |
--php-versions="8.2" \ | |
--arches="linux/amd64,linux/arm64" \ | |
publish-containers |