From 6d61222b3cd291e8a16b9c517a5c2ea8cbd65105 Mon Sep 17 00:00:00 2001 From: Paul Hewlett <1104895+eccles@users.noreply.github.com> Date: Wed, 20 Nov 2024 11:57:37 +0000 Subject: [PATCH] Update merge-requires.yml (#274) * Update merge-requires.yml Debug release action AB#10062 Signed-off-by: Paul Hewlett <1104895+eccles@users.noreply.github.com> * Update merge-requires.yml Fix github action Remove the release requires logic - we dont want the release to be triggered until we actually release otherwise the action erroneously attempts to upload a wheel to pypi with a spurious 0.0.1 tag. Additionally the release action publishes documentation to github pages and that **must not** happen until we release. This also simplifies logic in the merge-requires workflow - the test for github.event_name == 'release' did not apparently work. AB#10062 --------- Signed-off-by: Paul Hewlett <1104895+eccles@users.noreply.github.com> --- .github/workflows/merge-requires.yml | 19 +++---------------- .github/workflows/package.yml | 5 +++-- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/.github/workflows/merge-requires.yml b/.github/workflows/merge-requires.yml index 6756aa94..3fade33f 100644 --- a/.github/workflows/merge-requires.yml +++ b/.github/workflows/merge-requires.yml @@ -1,20 +1,16 @@ # This workflow configures the repository specific choices of which CI builds -# must pass in order for a build to merge. This allows a sinlge global teraform +# must pass in order for a build to merge. This allows a single global teraform # configured rule to require a "well known" check in each repository. Whilst # granting repository stakeholders the ability configure what workflows are # appropriate to satisfy that check. name: Merge Requires -on: - push: + +on: [pull_request] jobs: ci: secrets: inherit uses: ./.github/workflows/ci.yml - release: - if: ${{ github.event_name == 'release' }} - secrets: inherit - uses: ./.github/workflows/package.yml merge-checks-ok: runs-on: ubuntu-latest @@ -23,12 +19,3 @@ jobs: - name: ok run: | echo "This code is mergeable" - - release-checks-ok: - runs-on: ubuntu-latest - if: ${{ github.event_name == 'release' }} - needs: [ci, release] - steps: - - name: ok - run: | - echo "This code is releasable" diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index aad45459..3d18ae5b 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -4,10 +4,11 @@ name: Package and Publish on: - workflow_call: + release: + types: [created] jobs: - build: + deploy: runs-on: ubuntu-latest