-
-
Notifications
You must be signed in to change notification settings - Fork 45
183 lines (144 loc) · 5.58 KB
/
docker.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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
on:
schedule:
- cron: "0 0 * * */7" # This should run every hour
workflow_dispatch:
name: Docker images
jobs:
build-images:
name: Build & push Docker images
runs-on: ubuntu-22.04
strategy:
matrix:
runtime:
- name: freedesktop-20.08
packages: org.freedesktop.Platform//20.08 org.freedesktop.Sdk//20.08
remote: flathub
- name: freedesktop-21.08
packages: org.freedesktop.Platform//21.08 org.freedesktop.Sdk//21.08
remote: flathub
- name: freedesktop-22.08
packages: org.freedesktop.Platform//22.08 org.freedesktop.Sdk//22.08
remote: flathub
- name: freedesktop-23.08
packages: org.freedesktop.Platform//23.08 org.freedesktop.Sdk//23.08
remote: flathub
- name: freedesktop-24.08
packages: org.freedesktop.Platform//24.08 org.freedesktop.Sdk//24.08
remote: flathub
- name: gnome-3.38
packages: org.gnome.Platform//3.38 org.gnome.Sdk//3.38
remote: flathub
- name: gnome-40
packages: org.gnome.Platform//40 org.gnome.Sdk//40
remote: flathub
- name: gnome-41
packages: org.gnome.Platform//41 org.gnome.Sdk//41
remote: flathub
- name: gnome-42
packages: org.gnome.Platform//42 org.gnome.Sdk//42
remote: flathub
- name: gnome-43
packages: org.gnome.Platform//43 org.gnome.Sdk//43
remote: flathub
- name: gnome-44
packages: org.gnome.Platform//44 org.gnome.Sdk//44
remote: flathub
- name: gnome-45
packages: org.gnome.Platform//45 org.gnome.Sdk//45
remote: flathub
- name: gnome-46
packages: org.gnome.Platform//46 org.gnome.Sdk//46
remote: flathub
- name: gnome-47
packages: org.gnome.Platform//47 org.gnome.Sdk//47
remote: flathub
- name: gnome-nightly
packages: org.gnome.Platform//master org.gnome.Sdk//master
remote: gnome-nightly
- name: kde-5.15
packages: org.kde.Platform//5.15 org.kde.Sdk//5.15
remote: flathub
- name: kde-5.15-21.08
packages: org.kde.Platform//5.15-21.08 org.kde.Sdk//5.15-21.08
remote: flathub
- name: kde-5.15-22.08
packages: org.kde.Platform//5.15-22.08 org.kde.Sdk//5.15-22.08
remote: flathub
- name: kde-5.15-23.08
packages: org.kde.Platform//5.15-23.08 org.kde.Sdk//5.15-23.08
remote: flathub
- name: kde-5.15-24.08
packages: org.kde.Platform//5.15-24.08 org.kde.Sdk//5.15-24.08
remote: flathub
- name: kde-6.2
packages: org.kde.Platform//6.2 org.kde.Sdk//6.2
remote: flathub
- name: kde-6.3
packages: org.kde.Platform//6.3 org.kde.Sdk//6.3
remote: flathub
- name: kde-6.4
packages: org.kde.Platform//6.4 org.kde.Sdk//6.4
remote: flathub
- name: kde-6.5
packages: org.kde.Platform//6.5 org.kde.Sdk//6.5
remote: flathub
- name: kde-6.6
packages: org.kde.Platform//6.6 org.kde.Sdk//6.6
remote: flathub
- name: kde-6.7
packages: org.kde.Platform//6.7 org.kde.Sdk//6.7
remote: flathub
- name: kde-6.8
packages: org.kde.Platform//6.8 org.kde.Sdk//6.8
remote: flathub
- name: elementary-juno
packages: io.elementary.BaseApp//juno-20.08 org.gnome.Platform//3.38 org.gnome.Sdk//3.38
remote: flathub
services:
registry:
image: registry:latest
ports:
- 5000:5000
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/[email protected]
with:
driver-opts: network=host
- name: Cache Docker layers for the base image
uses: actions/[email protected]
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Build & push the Fedora base image to local registry
uses: docker/[email protected]
with:
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
context: .
file: Dockerfile
pull: true
push: true
tags: localhost:5000/fedora-base:latest
- name: Login to Docker Hub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Write the Dockerfile for the ${{ matrix.runtime.name }} runtime
run: |
cat >> ${{ matrix.runtime.name }}.Dockerfile << EOF
# syntax = docker/dockerfile:experimental
FROM localhost:5000/fedora-base:latest
RUN --security=insecure flatpak install -y --noninteractive ${{matrix.runtime.remote}} ${{ matrix.runtime.packages }}
- name: Build & push the ${{ matrix.runtime.name }} image to Docker Hub
uses: docker/[email protected]
with:
allow: security.insecure
context: .
file: ${{ matrix.runtime.name }}.Dockerfile
push: true
tags: bilelmoussaoui/flatpak-github-actions:${{ matrix.runtime.name }}