-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (50 loc) · 1.54 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
schedule:
- cron: '0 8 * * *'
# 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.1,8.2,8.3" 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" \
publish-containers