-
Notifications
You must be signed in to change notification settings - Fork 12
59 lines (49 loc) · 1.68 KB
/
Copy pathtest.yaml
File metadata and controls
59 lines (49 loc) · 1.68 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
name: Build Docker image
permissions:
contents: read
on:
push:
branches:
- "develop"
jobs:
build_push_develop:
runs-on: ubuntu-latest
steps:
## GitHub Action validation testing before starting workflow ##
- name: Ensure Docker token is present
env:
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
if: ${{ env.DOCKERHUB_TOKEN == '' }}
run: |
echo "Dockerhub token is not defined in GitHub secrets, exiting run"
exit 1
- name: Ensure Docker username is present
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
if: ${{ env.DOCKERHUB_USERNAME == '' }}
run: |
echo "Dockerhub username is not defined in GitHub secrets, exiting run"
exit 1
## Begin workflow ##
# https://github.com/marketplace/actions/docker-setup-qemu
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
# https://github.com/marketplace/actions/docker-setup-buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# https://github.com/marketplace/actions/docker-login
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and Push 8.4 Test
uses: docker/build-push-action@v6
if: ${{ github.ref == 'refs/heads/develop' }}
with:
push: true
no-cache: true
tags: 10up/wordpress-ci:php-8.4-develop
build-args: |
PHP_IMG=php:8.4-bookworm
COMPOSER_VERSION=${{ env.COMPOSER_VERSION }}