[NFDIV-4186] Set default org policies in HWF events #10110
Workflow file for this run
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
name: Diff CCD definition | |
on: | |
pull_request: | |
branches: | |
- master | |
jobs: | |
buildBranch: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: corretto | |
java-version: 17 | |
- uses: actions/checkout@v4 | |
with: | |
path: build/branch | |
- name: Build | |
run: ./gradlew generateCCDConfig | |
working-directory: build/branch | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: branch | |
path: build/branch/build/definitions/NFD | |
buildMaster: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: corretto | |
java-version: 17 | |
- uses: actions/checkout@v4 | |
with: | |
ref: master | |
path: build/master | |
- name: Build | |
run: ./gradlew generateCCDConfig | |
working-directory: build/master | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: master | |
path: build/master/build/definitions/NFD | |
report: | |
permissions: | |
issues: write | |
pull-requests: write | |
contents: write | |
runs-on: ubuntu-latest | |
needs: [buildBranch, buildMaster] | |
steps: | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 16 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: branch | |
path: build/branch | |
- uses: actions/download-artifact@v4 | |
with: | |
name: master | |
path: build/master | |
- name: Generate report | |
id: ccd-diff | |
run: | | |
REPORT="$(npx -q @hmcts/ccd-diff build/master build/branch)" | |
REPORT="${REPORT//'%'/'%25'}" | |
REPORT="${REPORT//$'\n'/'%0A'}" | |
REPORT="${REPORT//$'\r'/'%0D'}" | |
echo $REPORT | |
echo "::set-output name=content::$REPORT" | |
- name: Display | |
run: | | |
echo "${{ steps.ccd-diff.outputs.content }}" | |
- name: Add report | |
uses: thollander/actions-comment-pull-request@v2 | |
with: | |
message: | | |
# CCD diff report | |
${{ steps.ccd-diff.outputs.content }} | |
comment_includes: CCD diff report | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |