diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 873539d..cf0b67e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,8 +4,7 @@ name: Build and test on: - push: - + workflow_call: jobs: build: strategy: diff --git a/.github/workflows/merge-requires.yml b/.github/workflows/merge-requires.yml index 0a0bc03..4d060e1 100644 --- a/.github/workflows/merge-requires.yml +++ b/.github/workflows/merge-requires.yml @@ -5,29 +5,19 @@ # appropriate to satisfy that check. name: Merge Requires on: - workflow_run: - workflows: - - Build and test - - Package and Publish - types: - - completed + push: jobs: + ci: + secrets: inherit + uses: ./github/workflows/ci.yml + release: + secrets: inherit + uses: ./github/workflows/package.yml + merge-checks-ok: - runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.conclusion == 'success' }} - steps: - - run: | - echo 'The merge check passed' - echo ${{ github.event.workflow_run.name }} - echo ${{ github.event.workflow_run.url }} + needs: [ci] - merge-checks-failed: - runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.conclusion == 'failure' }} - steps: - - run: | - echo 'The merge check failed' - echo ${{ github.event.workflow_run.name }} - echo ${{ github.event.workflow_run.url }} - exit 1 + release-checks-ok: + if: ${{ github.event_name == 'release' }} + needs: [ci, release] \ No newline at end of file diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 00be301..738a70e 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -4,8 +4,7 @@ name: Package and Publish on: - pull_request: - release: + workflow_call: jobs: build: