From e74c5ecebfdf1b53cddf455cfaa0b07d9749d7f8 Mon Sep 17 00:00:00 2001 From: Salim Kayal Date: Tue, 12 Aug 2025 17:53:09 +0200 Subject: [PATCH 1/2] fix: trigger the tests for branch protection on create pr workflow actions --- .github/workflows/test.yaml | 6 ++++++ .github/workflows/update-versions.yml | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index bc8e975..e2e393a 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -2,6 +2,8 @@ name: Run Tests on: push: + repository_dispatch: + types: [run-tests-for-release-pr] env: DEVCONTAINER_REGISTRY: ghcr.io @@ -28,6 +30,8 @@ jobs: image_tag: ${{ steps.docker_image.outputs.image_tag }} steps: - uses: actions/checkout@v4 + with: + ref: ${{ github.event.client_payload.branch || github.head_ref || github.ref }} - name: Docker image metadata id: meta uses: docker/metadata-action@v5 @@ -73,6 +77,8 @@ jobs: - build-devcontainer steps: - uses: actions/checkout@v4 + with: + ref: ${{ github.event.client_payload.branch || github.head_ref || github.ref }} - name: Run linting id: lint uses: devcontainers/ci@v0.3 diff --git a/.github/workflows/update-versions.yml b/.github/workflows/update-versions.yml index 94cec61..d05b284 100644 --- a/.github/workflows/update-versions.yml +++ b/.github/workflows/update-versions.yml @@ -117,6 +117,16 @@ jobs: base: main delete-branch: true + - name: Trigger tests + uses: peter-evans/repository-dispatch@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + event-type: run-tests-for-release-pr + client-payload: | + { + "branch": "update-versions-${{ needs.validate-tag.outputs.version }}" + } + release: if: github.event_name == 'pull_request' && github.event.pull_request.merged == true && startsWith(github.head_ref, 'update-versions-') runs-on: ubuntu-latest From 2807db0269b335be4db433d74ae32f4896a16888 Mon Sep 17 00:00:00 2001 From: Salim Kayal Date: Tue, 12 Aug 2025 17:53:24 +0200 Subject: [PATCH 2/2] fix: force tag rewriting --- .github/workflows/update-versions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-versions.yml b/.github/workflows/update-versions.yml index d05b284..8ba445f 100644 --- a/.github/workflows/update-versions.yml +++ b/.github/workflows/update-versions.yml @@ -151,7 +151,7 @@ jobs: git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" git tag -f ${{ steps.extract_version.outputs.VERSION }} - git push origin ${{ steps.extract_version.outputs.VERSION }} --tags + git push origin ${{ steps.extract_version.outputs.VERSION }} --force --tags - name: publish buildpacks run: make publish_buildpacks