From 0f2ddb28ee611f9b26df1d58a98849a4f4ef75b6 Mon Sep 17 00:00:00 2001 From: mikaello <2505178+mikaello@users.noreply.github.com> Date: Thu, 24 Sep 2026 13:20:57 +0200 Subject: [PATCH] ci: gate feature publishing on successful tests --- .github/workflows/release.yaml | 20 ++++++++++++++------ .github/workflows/test.yaml | 3 +-- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 5d1bcbd..d43d75f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,15 +1,23 @@ name: "Release dev container features & Generate Documentation" on: - push: - branches: - - main + workflow_run: + workflows: ["CI - Test Features"] + types: [completed] + branches: [main] + +permissions: + contents: write + packages: write + pull-requests: write jobs: deploy: - if: github.ref == 'refs/heads/main' + if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'push' && github.event.workflow_run.head_branch == 'main' && github.event.workflow_run.head_repository.full_name == github.repository runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 + with: + ref: ${{ github.event.workflow_run.head_sha }} - name: "Publish Features" uses: devcontainers/action@v1 @@ -34,10 +42,10 @@ jobs: git config pull.rebase false branch=automated-documentation-update-$GITHUB_RUN_ID git checkout -b $branch - message='Automated documentation update' + message='docs: update generated feature documentation' # Add / update and commit git add */**/README.md - git commit -m 'Automated documentation update [skip ci]' || export NO_UPDATES=true + git commit -m 'docs: update generated feature documentation [skip ci]' || export NO_UPDATES=true # Push if [ "$NO_UPDATES" != "true" ] ; then git push origin "$branch" diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 522ecb5..f7cc974 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -9,8 +9,8 @@ on: jobs: test: runs-on: ubuntu-latest - continue-on-error: true strategy: + fail-fast: false matrix: features: - kotlinc @@ -30,7 +30,6 @@ jobs: test-global: runs-on: ubuntu-latest - continue-on-error: true steps: - uses: actions/checkout@v7