Repository navigation
149 lines (127 loc) · 4.97 KB
/
Copy pathdocker.yml
File metadata and controls
149 lines (127 loc) · 4.97 KB
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
on:
schedule:
- cron: "0 2 * * 1,5"
workflow_dispatch:
repository_dispatch:
types: [trigger-workflow]
name: Docker images
jobs:
build-images:
name: Build & push Docker images
runs-on: ubuntu-latest
permissions:
packages: write
strategy:
matrix:
runtime:
- name: freedesktop-24.08
packages: org.freedesktop.Platform//24.08 org.freedesktop.Sdk//24.08
remote: flathub
- name: freedesktop-25.08
packages: org.freedesktop.Platform//25.08 org.freedesktop.Sdk//25.08
remote: flathub
- name: freedesktop-26.08
packages: org.freedesktop.Platform//26.08 org.freedesktop.Sdk//26.08
remote: flathub
- name: gnome-49
packages: org.gnome.Platform//49 org.gnome.Sdk//49
remote: flathub
- name: gnome-50
packages: org.gnome.Platform//50 org.gnome.Sdk//50
remote: flathub
- name: gnome-51
packages: org.gnome.Platform//51 org.gnome.Sdk//51
remote: flathub
- name: kde-5.15-25.08
packages: org.kde.Platform//5.15-25.08 org.kde.Sdk//5.15-25.08
remote: flathub
- name: kde-6.9
packages: org.kde.Platform//6.9 org.kde.Sdk//6.9
remote: flathub
- name: kde-6.10
packages: org.kde.Platform//6.10 org.kde.Sdk//6.10
remote: flathub
- name: kde-6.11
packages: org.kde.Platform//6.11 org.kde.Sdk//6.11
remote: flathub
services:
registry:
image: registry@sha256:85347ed2ecde64161c7a4788a4d7d3dcc9d6f86f7be95834022e3c6a423a945a
ports:
- 5000:5000
steps:
- name: Free up disk space
run: |
sudo swapoff -a || true
sudo rm -rf /opt/ghc /usr/local/.ghcup || true
sudo rm -rf /opt/hostedtoolcache/CodeQL || true
sudo rm -rf /usr/local/julia*
sudo rm -rf /opt/hostedtoolcache/go /opt/az /opt/microsoft
sudo rm -rf /usr/share/miniconda /home/runner/.rustup /home/packer/.rustup /home/runneradmin/.rustup
sudo rm -rf /etc/skel/.rustup /opt/hostedtoolcache/node /opt/google-cloud-sdk
sudo rm -rf /usr/share/az_* /opt/google /usr/lib/firefox /usr/local/aws-*
sudo rm -rf /opt/actionarchivecache /opt/hostedtoolcache/Ruby
sudo rm -rf /var/lib/mysql /usr/local/n
sudo rm -rf /swapfile || true
sudo rm -rf /usr/local/lib/android
sudo rm -rf /usr/share/dotnet /usr/share/swift
sudo rm -rf /usr/local/share/boost /usr/local/share/powershell
sudo rm -rf /usr/lib/google-cloud-sdk /usr/lib/jvm
sudo rm -rf /usr/local/graalvm /usr/local/share/chromium
sudo rm -rf /usr/local/lib/node_modules
sudo rm -rf /usr/lib/dotnet /usr/lib/php /usr/share/mysql
sudo rm -rf /usr/lib/llvm-*
sudo rm -rf /usr/lib/mono
sudo apt-get clean || true
sudo rm -rf /var/lib/apt/lists/*
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
persist-credentials: false
- name: Set up QEMU
# 3.6.0
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392
- name: Set up Docker Buildx
# 3.10.0
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2
with:
driver-opts: network=host
- name: Build & push the base image to local registry
# 6.15.0
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4
with:
context: .
file: Dockerfile
platforms: linux/amd64,linux/arm64
pull: true
push: true
tags: localhost:5000/base:latest
- name: Login to ghcr.io
# 3.4.0
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_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/base:latest
RUN --security=insecure flatpak install -y --noninteractive ${{matrix.runtime.remote}} ${{ matrix.runtime.packages }}
EOF
- name: Build & push the ${{ matrix.runtime.name }} image
# 6.15.0
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4
with:
allow: security.insecure
context: .
file: ${{ matrix.runtime.name }}.Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/flathub-infra/flatpak-github-actions:${{ matrix.runtime.name }}
test_actions:
needs:
- build-images
permissions: {}
uses: ./.github/workflows/test.yml