-
Notifications
You must be signed in to change notification settings - Fork 0
125 lines (115 loc) · 3.89 KB
/
container.yml
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
name: Flutter Images
env:
CYPRESS_VERSION: 12.17.1
FLUTTER_STABLE_VERSION: 3.16.3
on:
push:
branches:
- master
pull_request:
branches: [master] # only PRs to master branch
#types: [opened, synchronized] <- already pretty much the defaults
merge_group:
# limit parallel jobs/cancel old container builds if we start a new one
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
names:
runs-on: ubuntu-latest
outputs:
version_suffix: ${{ github.ref != 'refs/heads/master' && '-' || '' }}${{ github.ref != 'refs/heads/master' && steps.slug.outputs.slug-url || '' }}
flutter_version: ${{ steps.flutver.outputs.slug }} # slugified version because why not
cypress_version: ${{ steps.cypressver.outputs.slug }} # slugified version because why not
steps:
- name: Sluggify suffix
id: slug
uses: rlespinasse/slugify-value@a4879db1eb3db9bbee01dca36f98a8236c2b8239 # 1.4.0
with:
key: VERSION_SUFFIX
value: ${{ github.ref }}
- name: Pass through flutter version
id: flutver
uses: rlespinasse/slugify-value@a4879db1eb3db9bbee01dca36f98a8236c2b8239 # 1.4.0
with:
key: FLUTTER_STABLE_VERSION
- name: Pass through cypress version
id: cypressver
uses: rlespinasse/slugify-value@a4879db1eb3db9bbee01dca36f98a8236c2b8239 # 1.4.0
with:
key: CYPRESS_VERSION
android:
permissions:
packages: write
contents: read
needs: [names]
uses: ./.github/workflows/build-container.yml
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
with:
version_suffix: ${{ needs.names.outputs.version_suffix }}
version: ${{ needs.names.outputs.flutter_version }}
image: "android"
flutter:
permissions:
packages: write
contents: read
needs: [names, android]
uses: ./.github/workflows/build-container.yml
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
with:
version_suffix: ${{ needs.names.outputs.version_suffix }}
version: ${{ needs.names.outputs.flutter_version }}
image: "flutter"
build-args: |
flutter_version=${{ needs.names.outputs.flutter_version}}
image_base=ghcr.io/${{ github.repository }}/android:${{ needs.names.outputs.flutter_version }}${{ needs.names.outputs.version_suffix }}
integration:
permissions:
packages: write
contents: read
needs: [names, flutter]
uses: ./.github/workflows/build-container.yml
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
with:
version_suffix: ${{ needs.names.outputs.version_suffix }}
version: ${{ needs.names.outputs.flutter_version }}
image: "integration"
build-args: |
flutter_image=ghcr.io/${{ github.repository }}/flutter:${{ needs.names.outputs.flutter_version }}${{ needs.names.outputs.version_suffix }}
flutter-linux:
permissions:
packages: write
contents: read
needs: [names]
uses: ./.github/workflows/build-container.yml
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
with:
version_suffix: ${{ needs.names.outputs.version_suffix }}
version: ${{ needs.names.outputs.flutter_version }}
image: "flutter-linux"
build-args: |
flutter_version=${{ needs.names.outputs.flutter_version}}
channel=stable
cypress:
permissions:
packages: write
contents: read
needs: [names]
uses: ./.github/workflows/build-container.yml
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
with:
version_suffix: ${{ needs.names.outputs.version_suffix }}
version: ${{ needs.names.outputs.cypress_version }}
image: "cypress"
build-args: |
cypress_version=${{ needs.names.outputs.cypress_version }}
all-passed:
runs-on: ubuntu-latest
needs: [cypress, flutter-linux, integration, flutter, android]
steps:
- run: "echo all passed"