-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (35 loc) · 1.08 KB
/
build-and-push.yaml
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
name: build-and-push
on:
push:
branches:
- 'master'
env:
REGISTRY: ghcr.io
REPO_PREFIX: elifesciences/
jobs:
build-and-push:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.ref }}-${{ matrix.php_version }}
cancel-in-progress: true
strategy:
matrix:
php_version: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
with:
driver-opts: image=moby/buildkit:v0.9.1
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: run docker buildx and push images
run: make COMMIT=${GITHUB_SHA} REPO_PREFIX=${{ env.REGISTRY }}/${{ env.REPO_PREFIX }} buildx-and-push-php-${{ matrix.php_version }}