Skip to content

refactor(wordpress): make code friendly to various base images #693

refactor(wordpress): make code friendly to various base images

refactor(wordpress): make code friendly to various base images #693

Workflow file for this run

name: Smoke tests
on:
push:
paths:
- 'features/src/**'
- 'test/**'
- '.github/workflows/smoke-tests.yml'
- '!**/README.md'
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
permissions:
contents: read
jobs:
prepare:
name: Prepare list of tests
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Check out the repo
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
- name: Set matrix
id: set-matrix
working-directory: test
run: |
echo matrix="$(find . -name "devcontainer*.json" -exec basename {} \; | jq -R . | jq -sc)" >> "${GITHUB_OUTPUT}"
smoke-tests:
needs: prepare
name: ${{ matrix.file }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
file: ${{ fromJson(needs.prepare.outputs.matrix) }}
permissions:
contents: read
packages: read
env:
BUILDKIT_PROGRESS: plain
steps:
- name: Check out the repo
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Copy features
working-directory: test
run: |
mkdir -p .devcontainer/features
rsync -a --delete ../features/src/* .devcontainer/features
sed -i 's!ghcr.io/automattic/vip-codespaces/!./.devcontainer/features/!' .devcontainer/features/*/devcontainer-feature.json
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
- name: Expose GitHub Runtime
uses: Automattic/vip-actions/expose-github-runtime@e1faabf165941008de4c0c1381df153e49d8ad2c # v0.6.0
- name: Install @devcontainers/cli
run: npm install -g @devcontainers/cli
- name: Build images
working-directory: images/src
run: |
REPO="$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')"
for image in *; do
devcontainer build \
--workspace-folder "./${image}" \
--image-name="ghcr.io/${REPO}/${image}:latest" \
--cache-from type=gha
done
- name: Build
working-directory: test
run: devcontainer build --config "${{ matrix.file }}" --workspace-folder .