From 00abd345ac4eadfb5fdbfed27d7d15b3dcc26fc3 Mon Sep 17 00:00:00 2001 From: Rob Winch Date: Wed, 18 Aug 2021 11:27:45 -0500 Subject: [PATCH] Add Dispatch to build reference --- .github/ISSUE_TEMPLATE.md | 17 +++++++++++++++++ .github/actions/dispatch.sh | 5 +++++ .github/workflows/build-reference.yml | 18 ++++++++++++++++++ .../workflows/gradle-wrapper-validation.yml | 10 ++++++++++ 4 files changed, 50 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE.md create mode 100755 .github/actions/dispatch.sh create mode 100644 .github/workflows/build-reference.yml create mode 100644 .github/workflows/gradle-wrapper-validation.yml diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..36717b48 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,17 @@ + +**Affects:** \ + +--- + diff --git a/.github/actions/dispatch.sh b/.github/actions/dispatch.sh new file mode 100755 index 00000000..d6c2a377 --- /dev/null +++ b/.github/actions/dispatch.sh @@ -0,0 +1,5 @@ +REPOSITORY_REF="$1" +TOKEN="$2" + +curl -H "Accept: application/vnd.github.everest-preview+json" -H "Authorization: token ${TOKEN}" --request POST --data '{"event_type": "request-build"}' https://api.github.com/repos/${REPOSITORY_REF}/dispatches +echo "Requested Build for $REPOSITORY_REF" \ No newline at end of file diff --git a/.github/workflows/build-reference.yml b/.github/workflows/build-reference.yml new file mode 100644 index 00000000..3e3f714e --- /dev/null +++ b/.github/workflows/build-reference.yml @@ -0,0 +1,18 @@ +name: reference + +on: + push: + branches-ignore: + - 'gh-pages' + +env: + GH_TOKEN_DISPATCH: ${{ secrets.GH_TOKEN_DISPATCH }} + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout Source + uses: actions/checkout@v2 + - name: Dispatch Build Request + run: ${GITHUB_WORKSPACE}/.github/actions/dispatch.sh 'rwinch/spring-reference' "$GH_TOKEN_DISPATCH" \ No newline at end of file diff --git a/.github/workflows/gradle-wrapper-validation.yml b/.github/workflows/gradle-wrapper-validation.yml new file mode 100644 index 00000000..405a2b30 --- /dev/null +++ b/.github/workflows/gradle-wrapper-validation.yml @@ -0,0 +1,10 @@ +name: "Validate Gradle Wrapper" +on: [push, pull_request] + +jobs: + validation: + name: "Validation" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: gradle/wrapper-validation-action@v1