-
Notifications
You must be signed in to change notification settings - Fork 3
35 lines (33 loc) · 1.09 KB
/
php80-github-actions.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
name: Build php-80 docker images multi-arch
on:
push:
branches:
- multi-arch
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Get branch names
id: branch-name
uses: tj-actions/branch-names@v5
- name: checkout code
uses: actions/checkout@v2
- name: login to docker hub
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
- name: create --use
run: docker buildx create --use
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v1
with:
image: tonistiigi/binfmt:latest
platforms: all
- name: buildx ls
run: docker buildx ls
- name: build the branch-specific images for amd64/arm64
if: steps.branch-name.outputs.current_branch != 'master'
run: ./build.sh both 80 ${{ steps.branch-name.outputs.current_branch }}
- name: build the main images for amd64/arm64
if: steps.branch-name.outputs.current_branch == 'master'
run: ./build.sh both 80