-
Notifications
You must be signed in to change notification settings - Fork 27
71 lines (62 loc) · 2.54 KB
/
ci-build-php.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
name: build-php
on:
push:
branches:
- master
tags:
pull_request:
jobs:
build-images:
name: Build PHP Docker images
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: set up QEMU
uses: docker/setup-qemu-action@v3
- name: set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: build PHP 8.1 image for ghcr.io and DockerHub
working-directory: config/php
if: ${{ github.ref == 'refs/heads/master' }}
env:
GITHUB_PACKAGE_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }}
USERNAME: ${{ github.actor }}
run: |
echo ${GITHUB_PACKAGE_TOKEN} | docker login ghcr.io -u ${USERNAME} --password-stdin
echo ${DOCKER_HUB_TOKEN} | docker login -u paskal --password-stdin
docker buildx build --push \
--platform linux/amd64,linux/arm64 \
-f Dockerfile.8.1 \
-t ghcr.io/paskal/bitrix-php:8.1 -t paskal/bitrix-php:8.1 .
- name: build PHP 8.2 image for ghcr.io and DockerHub
working-directory: config/php
if: ${{ github.ref == 'refs/heads/master' }}
env:
GITHUB_PACKAGE_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }}
USERNAME: ${{ github.actor }}
run: |
echo ${GITHUB_PACKAGE_TOKEN} | docker login ghcr.io -u ${USERNAME} --password-stdin
echo ${DOCKER_HUB_TOKEN} | docker login -u paskal --password-stdin
docker buildx build --push \
--platform linux/amd64,linux/arm64 \
-f Dockerfile.8.2 \
-t ghcr.io/paskal/bitrix-php:8.2 -t paskal/bitrix-php:8.2 .
- name: build PHP 8.3 image for ghcr.io and DockerHub
working-directory: config/php
if: ${{ github.ref == 'refs/heads/master' }}
env:
GITHUB_PACKAGE_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }}
USERNAME: ${{ github.actor }}
run: |
echo ${GITHUB_PACKAGE_TOKEN} | docker login ghcr.io -u ${USERNAME} --password-stdin
echo ${DOCKER_HUB_TOKEN} | docker login -u paskal --password-stdin
docker buildx build --push \
--platform linux/amd64,linux/arm64 \
-f Dockerfile.8.3 \
-t ghcr.io/paskal/bitrix-php:8.3 -t paskal/bitrix-php:8.3 .