-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from pactflow/feat/contract_requiring_verifica…
…tion_published_webhook Feat/contract requiring verification published webhook
- Loading branch information
Showing
5 changed files
with
108 additions
and
73 deletions.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
.github/workflows/contract_requiring_verification_published.yml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: contract_requiring_verification_published | ||
|
||
# This workflow leverages the https://docs.pact.io/pact_broker/webhooks#the-contract-requiring-verification-published-event webhook | ||
|
||
on: | ||
repository_dispatch: | ||
types: | ||
- contract_requiring_verification_published | ||
workflow_dispatch: | ||
# inputs aren't available on push, so we set them explicitly in separate steps | ||
inputs: | ||
PACT_URL: | ||
description: URL of pact to verify | ||
required: true | ||
|
||
env: | ||
PACT_BROKER_BASE_URL: https://test.pactflow.io | ||
PACT_BROKER_TOKEN: ${{ secrets.PACTFLOW_TOKEN_FOR_CI_CD_WORKSHOP }} | ||
PACT_BROKER_PUBLISH_VERIFICATION_RESULTS: true | ||
PACT_BROKER_HOST: test.pactflow.io # For pact-jvm | ||
PACT_URL: ${{ github.event.client_payload.pact_url }} | ||
GIT_COMMIT: ${{ github.event.client_payload.sha }} | ||
GIT_BRANCH: ${{ github.event.client_payload.branch }} | ||
DESCRIPTION: ${{ github.event.client_payload.message }} | ||
|
||
jobs: | ||
verify-contract-requiring-verification: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout default branch if user manually provides pact URL | ||
uses: actions/checkout@v4 | ||
if: ${{ github.event.inputs.PACT_URL }} | ||
- name: checkout specific SHA if webhook provides pact URL | ||
uses: actions/checkout@v4 | ||
if: ${{ github.event.client_payload.pact_url }} | ||
with: | ||
ref: ${{env.GIT_COMMIT}} | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '17' | ||
- run: docker pull pactfoundation/pact-cli:latest | ||
- name: ${{env.DESCRIPTION}} | ||
run: make ci_webhook |
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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