-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (42 loc) · 1.31 KB
/
build-wordpress.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
name: Build WordPress Image
on:
push:
branches:
- main
paths:
- 'wordpress/*'
- '.github/workflows/build-wordpress.yml'
pull_request:
paths:
- 'wordpress/*'
- '.github/workflows/build-wordpress.yml'
workflow_dispatch:
schedule:
- cron: '30 12 * * 5'
concurrency:
# SHA is added to the end if on `main` to let all main workflows run
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ github.ref == 'refs/heads/main' && github.sha || '' }}
cancel-in-progress: true
jobs:
get_version:
runs-on: ubuntu-latest
outputs:
WP_VERSION: ${{ steps.wp-version.outputs.WP_VERSION }}
steps:
- name: Get latest WP version
id: wp-version
run: |
WP_VERSION=$(curl -s https://latest.cmm.io/wordpress | sed 's/\([0-9]*\.[0-9]*\)\.0$/\1/')
echo "WP_VERSION=$WP_VERSION" >$GITHUB_OUTPUT
build:
uses: Chia-Network/actions/.github/workflows/docker-build.yaml@main
needs:
- get_version
with:
alternate-latest-mode: true
docker-context: "./wordpress"
dockerfile: "./wordpress/Dockerfile"
image_subpath: "wordpress"
build-args: |
WORDPRESS_VERSION="${{ needs.get_version.outputs.WP_VERSION }}"
additional-tag: ${{ needs.get_version.outputs.WP_VERSION }}