Add gz template #9
Workflow file for this run
This file contains hidden or 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: "CI - Test Templates" | |
| on: | |
| pull_request: | |
| jobs: | |
| smoke-test: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| # Give the default GITHUB_TOKEN write permission to commit and push the | |
| # added or changed files to the repository. | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Smoke test for "gz" | |
| id: smoke_test | |
| uses: ./.github/actions/smoke-test | |
| with: | |
| template: "gz" | |
| gen-docs: | |
| if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| # Give the default GITHUB_TOKEN write permission to commit and push the | |
| # added or changed files to the repository. | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ github.head_ref }} | |
| token: ${{ secrets.CI_BOT_TOKEN }} | |
| - name: "Publish Templates" | |
| uses: devcontainers/action@v1 | |
| with: | |
| publish-templates: "false" | |
| base-path-to-templates: "./templates/src" | |
| generate-docs: "true" | |
| - uses: stefanzweifel/git-auto-commit-action@v7 | |
| with: | |
| commit_message: Update generated docs | |
| complete: | |
| needs: | |
| - gen-docs | |
| - smoke-test | |
| if: always() | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Verify required jobs succeeded | |
| env: | |
| SMOKE_TEST_RESULT: ${{ needs.smoke-test.result }} | |
| GEN_DOCS_RESULT: ${{ needs.gen-docs.result }} | |
| run: | | |
| set -euo pipefail | |
| echo "smoke_test: ${SMOKE_TEST_RESULT}" | |
| echo "gen_docs: ${GEN_DOCS_RESULT}" | |
| if [[ "${SMOKE_TEST_RESULT}" != "success" ]]; then | |
| echo "Required job 'smoke_test' did not succeed." | |
| exit 1 | |
| fi | |
| # gen_docs is skipped for fork PRs by design; treat that as acceptable. | |
| if [[ "${GEN_DOCS_RESULT}" != "success" && "${GEN_DOCS_RESULT}" != "skipped" ]]; then | |
| echo "Required job 'gen_docs' failed or was cancelled." | |
| exit 1 | |
| fi | |
| echo "All required jobs completed successfully." |