manual test devcontainer image #9
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: 'manual test devcontainer image' | |
on: | |
# can only be triggered manually | |
workflow_dispatch: | |
inputs: | |
additionalTestCmd: | |
description: 'A shell expression to run after the default test commands' | |
required: true | |
default: 'echo "WP_ENV_HOME=${WP_ENV_HOME} !"' | |
jobs: | |
# build-devcontainer-image-if-outdated: | |
# uses: ./.github/workflows/build-devcontainer.yml | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout branch from git | |
uses: actions/checkout@v4 | |
- uses: ./.github/shared/actions/devcontainer-image-name | |
id: image_name | |
- name: use devcontainer image | |
uses: devcontainers/ci@v0.3 | |
with: | |
push: never | |
# use the image_name output variable produced by ./.github/shared/devcontainer-image-name.yaml | |
cacheFrom: ${{ steps.image_name.outputs.image_name }} | |
runCmd: | | |
# echo 'y' | pnpm install --frozen-lockfile | |
# pnpm build | |
${{ github.event.inputs.additionalTestCmd }} |