-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (82 loc) · 2.67 KB
/
docker-images.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
name: Docker Build
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
on:
schedule:
- cron: '27 7 * * *'
push:
branches: [ "main" ]
paths:
- '.github/actions/**'
- .github/workflows/docker-images.yml
workflow_dispatch:
inputs:
magentoVersion:
description: 'Magento Version to limit execution to'
required: false
default: '2.4.6-p2'
magentoVariation:
description: 'Magento Variation to limit execution to'
required: false
default: default
jobs:
generate-matrix:
runs-on: ubuntu-24.04
outputs:
magento: ${{ steps.matrix.outputs.magento }}
containers: ${{ steps.matrix.outputs.containers }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/generate-matrix
id: matrix
with:
version: ${{ inputs.magentoVersion }}
variation: ${{ inputs.magentoVariation }}
build-magento:
runs-on: ubuntu-24.04
needs: generate-matrix
strategy:
matrix:
include: ${{ fromJson(needs.generate-matrix.outputs.magento) }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-magento
with:
artifact: ${{ matrix.artifact }}
mariadb: ${{ matrix.mariadb }}
opensearch: ${{ matrix.opensearch }}
php: ${{ matrix.php }}
version: ${{ matrix.magentoVersion }}
kind: ${{ matrix.kind }}
stability: ${{ matrix.stability }}
composerAuth: ${{ secrets.COMPOSER_AUTH }}
composerRepository: 'https://repo.magento.com/'
id: build
build-container:
runs-on: ubuntu-24.04
needs: [generate-matrix, build-magento]
permissions:
packages: write
contents: read
attestations: write
id-token: write
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.generate-matrix.outputs.containers) }}
steps:
- uses: actions/checkout@v4
- name: Build linux/amd64 and linux/arm64 version of Docker image
uses: ./.github/actions/build-image
with:
artifact: ${{ matrix.artifact }}
containerType: ${{ matrix.containerType }}
imageName: ${{ github.repository_owner }}/testcontainer-magento/${{ matrix.containerType }}
imageTags: ${{ matrix.tag }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
version: ${{ matrix.version }}
push: ${{ github.event_name != 'pull_request' }}
platforms: 'linux/amd64,linux/arm64'