Skip to content

fix: init wp-config before retrieve CONTENT_DIR with wp-cli command #93

fix: init wp-config before retrieve CONTENT_DIR with wp-cli command

fix: init wp-config before retrieve CONTENT_DIR with wp-cli command #93

Workflow file for this run

name: Build and Push Docker Images
on:
push:
branches:
- main
workflow_dispatch:
defaults:
run:
shell: "bash -Eeuo pipefail -x {0}"
jobs:
generate-jobs:
name: Generate Jobs
runs-on: ubuntu-latest
outputs:
strategy: ${{ steps.generate-jobs.outputs.strategy }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Generate Matrix
id: generate-jobs
run: |
strategy="$("./matrix.sh")"
echo "strategy=$strategy" >> "$GITHUB_OUTPUT"
jq . <<<"$strategy" # sanity check / debugging aid
build:
name: ${{ matrix.name }}
needs: generate-jobs
runs-on: ubuntu-latest
strategy:
matrix: ${{ fromJson(needs.generate-jobs.outputs.strategy) }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v5
with:
context: ${{ matrix.context }}
tags: ${{ matrix.tag }}
push: true
cache-from: type=gha,scope=${{ github.ref_name }}-${{ matrix.name }}
cache-to: type=gha,mode=max,scope=${{ github.ref_name }}-${{ matrix.name }}