-
Notifications
You must be signed in to change notification settings - Fork 2
73 lines (63 loc) · 2.34 KB
/
guacamole.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
name: "Guacamole 🐳 Mirror"
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
push:
branches:
- '*'
paths:
- 'images/php/*'
env:
REPOSITORY_OWNER: "docker-mirror"
MIRROR_IMAGE_PATH: guacamole
jobs:
mirror_matrix_generator:
name: "🐳 Mirror Matrix Generator"
runs-on: ubuntu-latest
outputs:
dockerinfo: ${{ steps.set-matrix.outputs.dockerinfo }}
steps:
- name: "📥 Fetching Repository Contents"
uses: actions/checkout@main
- name: "📥 Generate Matrix Data"
id: set-matrix
run: php .github/scripts/matrix.php "${{ env.MIRROR_IMAGE_PATH }}"
mirror_image:
runs-on: ubuntu-latest
needs: mirror_matrix_generator
name: "🚀 ${{ matrix.dockerinfo.name }}"
continue-on-error: true
strategy:
fail-fast: false
max-parallel: 20
matrix:
dockerinfo: ${{fromJson(needs.mirror_matrix_generator.outputs.dockerinfo)}}
steps:
- name: "📥 Fetching Repository Contents"
uses: actions/checkout@main
- name: "⚡ Setup DockerFile"
run: |
echo " " >> ./${{matrix.dockerinfo.file}}
echo "LABEL org.opencontainers.image.source=\"https://github.com/${GITHUB_REPOSITORY}/\"" >> ./${{matrix.dockerinfo.file}}
echo "LABEL org.opencontainers.image.url=\"https://github.com/${GITHUB_REPOSITORY}/\"" >> ./${{matrix.dockerinfo.file}}
echo "LABEL org.opencontainers.image.documentation=\"https://github.com/${GITHUB_REPOSITORY}/\"" >> ./${{matrix.dockerinfo.file}}
echo "LABEL org.opencontainers.image.vendor=\"Unofficial Docker Hub Mirror\"" >> ./${{matrix.dockerinfo.file}}
cat ./${{matrix.dockerinfo.file}}
- name: "⚡ Docker QEMU"
uses: docker/setup-qemu-action@master
- name: "⚡ Docker BuildX"
uses: docker/setup-buildx-action@master
- name: "🔒 Log into GitHub Container Registry"
uses: docker/login-action@master
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: "🎉 Build & 🚀 Publish"
uses: docker/build-push-action@master
with:
file: ./${{ matrix.dockerinfo.file }}
push: true
tags: |
ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.dockerinfo.name }}