Skip to content

Commit b663dea

Browse files
authored
ci-wip: arm runner, skiip docker cleanup, bootstrap package maintenance
1 parent b898fd1 commit b663dea

File tree

2 files changed

+44
-4
lines changed

2 files changed

+44
-4
lines changed

β€Ž.github/workflows/__package.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ jobs:
167167
168168
docker:
169169
name: Docker image for ${{ matrix.platform }} πŸ’ΏπŸ³
170-
runs-on: ubuntu-latest
170+
runs-on: ${{ contains(matrix.platform, 'arm') && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
171171
needs: docker_inputs
172172
strategy:
173173
fail-fast: false
@@ -189,6 +189,9 @@ jobs:
189189

190190
- name: Configure Docker Buildx βš™οΈ
191191
uses: docker/setup-buildx-action@v3.8.0
192+
with:
193+
cleanup: false
194+
version: latest
192195

193196
- name: Build images πŸ› οΈ
194197
uses: docker/build-push-action@v6.13.0
@@ -197,11 +200,9 @@ jobs:
197200
context: .
198201
file: packaging/docker/Dockerfile
199202
platforms: ${{ format('linux/{0}', matrix.platform) }}
200-
cache-from: |
201-
type=gha,scope=buildx-${{ matrix.platform }}
203+
no-cache: true
202204
cache-to: |
203205
type=local,mode=min,dest=/tmp/${{ env.REGISTRY_IMAGE }}/cache/${{ matrix.platform }}
204-
type=gha,mode=min,ignore-error=true,scope=buildx-${{ matrix.platform }}
205206
outputs: type=docker,dest=docker_image.tar
206207
build-args: |
207208
${{ inputs.commit == '' && 'IS_STABLE=1' || '' }}
@@ -295,6 +296,9 @@ jobs:
295296

296297
- name: Configure Docker Buildx βš™οΈ
297298
uses: docker/setup-buildx-action@v3.8.0
299+
with:
300+
cleanup: false
301+
version: latest
298302

299303
- name: Login to Docker Hub πŸ”‘
300304
uses: docker/login-action@v3.3.0

β€Ž.github/workflows/schedule.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,39 @@ jobs:
1515
security-events: write
1616
with:
1717
commit: ${{ github.sha }}
18+
19+
container_retention:
20+
name: Package maintenance πŸ‘·β€β™‚οΈ
21+
runs-on: ubuntu-latest
22+
env:
23+
REGISTRY_IMAGE: jellyfin/jellyfin-vue
24+
steps:
25+
- name: Login to GitHub Container Registry πŸ”‘
26+
uses: docker/login-action@v3.3.0
27+
with:
28+
registry: ghcr.io
29+
username: ${{ github.repository_owner }}
30+
password: ${{ secrets.JF_BOT_TOKEN }}
31+
32+
- name: Login to Docker Hub πŸ”‘
33+
uses: docker/login-action@v3.3.0
34+
with:
35+
username: ${{ secrets.DOCKERHUB_USERNAME }}
36+
password: ${{ secrets.DOCKERHUB_TOKEN }}
37+
38+
- name: Remove old container versions πŸ—‘οΈ
39+
uses: snok/container-retention-policy@v3.0.0
40+
with:
41+
account: ${{ github.repository_owner }}
42+
token: ${{ secrets.GITHUB_TOKEN }}
43+
image-names: ${{ env.REGISTRY_IMAGE }}
44+
image-tags: unstable*
45+
tag-selection: both
46+
cut-off: 4w # 4 weeks
47+
dry-run: true
48+
49+
# Waiting for https://github.com/containers/skopeo/issues/2503
50+
# - name: Sync GHCR with DockerHub πŸ”„
51+
# run: |
52+
# sudo apt -y install skopeo
53+
# skopeo sync -a --preserve-digests -s docker://ghcr.io/"$REGISTRY_IMAGE" -d docker://docker.io/"$REGISTRY_IMAGE"

0 commit comments

Comments
Β (0)