Add wordpress init container + nginx + php container #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Nginx WordPress Image | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'nginx/*' | ||
- '.github/workflows/build-nginx.yml' | ||
pull_request: | ||
paths: | ||
- 'nginx/*' | ||
- '.github/workflows/build-nginx.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: | ||
package: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/checkout@v4 | ||
repository: '10up/nginx_configs' | ||
Check failure on line 30 in .github/workflows/build-nginx.yml GitHub Actions / Build Nginx WordPress ImageInvalid workflow file
|
||
path: nginx/nginx_configs | ||
- name: Template security configs | ||
run: | | ||
export AUTOMATTIC_IPV4_BLOCKS=$(curl -s https://jetpack.com/ips-v4.txt) | ||
export AUTOMATTIC_IPV6_BLOCKS=$(cat nginx/security/automattic-ipv6.txt) | ||
j2 -o nginx/security/automatticips.inc nginx/security/automatticips.inc.j2 | ||
# Also remove the 10up version of automattic ips that doesn't automatically update | ||
rm nginx/nginx_configs/security/automatticips.inc | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ github.token }} | ||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: | | ||
ghcr.io/${{ github.repository }}/nginx | ||
tags: | | ||
type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }} | ||
type=sha,format=long | ||
- name: Build Docker Container | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: nginx | ||
file: nginx/Dockerfile | ||
platforms: "linux/amd64,linux/arm64" | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} |