-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (92 loc) · 3.71 KB
/
docker-multi.yml
File metadata and controls
95 lines (92 loc) · 3.71 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
name: Docker MultiArch
on:
workflow_dispatch:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
version:
- '8.2'
- '8.2-fpm'
- '8.2-full'
- '8.2-debug'
- '8.2-full-nginx'
- '8.3'
- '8.3-fpm'
- '8.3-full'
- '8.3-debug'
- '8.3-full-nginx'
- '8.4'
- '8.4-fpm'
- '8.4-full'
- '8.4-debug'
- '8.4-full-nginx'
- '8.5'
- '8.5-fpm'
- '8.5-full'
- '8.5-debug'
- '8.5-full-nginx'
steps:
- uses: actions/checkout@v6
- uses: docker/setup-qemu-action@v4
- uses: docker/setup-buildx-action@v4
- name: Test Ruby Version
run: ruby -v
- id: install_puppet
name: Install Puppet
continue-on-error: true
run: |
sudo apt-get -qqy install git sudo ruby
sudo gem install puppet -v 7.27.0 --no-document
sudo rm -fR /etc/puppetlabs/code/modules/image_build
sudo git clone --single-branch --branch v2 https://github.com/luckyraul/puppetlabs-image_build.git /etc/puppetlabs/code/modules/image_build
- name: Test Puppet Version
run: puppet -V
- name: Build Image
run: |
for arch in amd64 arm64 ; do
sudo puppet docker build --image-name mygento/php:${{ matrix.version }}-$arch --no-show-diff --native --buildkit --platform linux/$arch --load
done
- name: Test Image Version Amd64
run: docker run --rm mygento/php:${{ matrix.version }}-amd64 php -v
- name: Test Image Version Arm64
run: docker run --rm mygento/php:${{ matrix.version }}-arm64 php -v
- name: Test Image Modules
run: docker run --rm mygento/php:${{ matrix.version }}-amd64 php -m
- name: Test Image Config
run: docker run --rm mygento/php:${{ matrix.version }}-amd64 php -i
- name: Login to GitHub Container Registry
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
- name: Retag Images
run: |
docker tag mygento/php:${{ matrix.version }}-amd64 ghcr.io/luckyraul/php:${{ matrix.version }}-amd64
docker tag mygento/php:${{ matrix.version }}-arm64 ghcr.io/luckyraul/php:${{ matrix.version }}-arm64
- name: Push Images
run: |
docker push ghcr.io/luckyraul/php:${{ matrix.version }}-amd64
docker push ghcr.io/luckyraul/php:${{ matrix.version }}-arm64
- name: Create Manifest
run: |
docker manifest create ghcr.io/luckyraul/php:${{ matrix.version }} --amend ghcr.io/luckyraul/php:${{ matrix.version }}-arm64 --amend ghcr.io/luckyraul/php:${{ matrix.version }}-amd64
docker manifest push ghcr.io/luckyraul/php:${{ matrix.version }}
- name: Retag Images Mygento
run: |
docker tag ghcr.io/luckyraul/php:${{ matrix.version }}-amd64 ghcr.io/mygento/php:${{ matrix.version }}-amd64
docker tag ghcr.io/luckyraul/php:${{ matrix.version }}-arm64 ghcr.io/mygento/php:${{ matrix.version }}-arm64
- name: Push Images Mygento
run: |
docker push ghcr.io/mygento/php:${{ matrix.version }}-amd64
docker push ghcr.io/mygento/php:${{ matrix.version }}-arm64
- name: Create Manifest Mygento
run: |
docker manifest create ghcr.io/mygento/php:${{ matrix.version }} --amend ghcr.io/mygento/php:${{ matrix.version }}-arm64 --amend ghcr.io/mygento/php:${{ matrix.version }}-amd64
docker manifest push ghcr.io/mygento/php:${{ matrix.version }}