Update review dates #129
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: Auto-approve date change only PR | |
on: | |
pull_request: | |
paths: | |
- "source/**" | |
env: | |
PR_OWNER: ${{ github.event.pull_request.user.login }} | |
GITHUB_OAUTH_TOKEN: ${{ secrets.MOJ_AUTO_APPROVE_WRITE_BOT_PAT }} | |
TEAM_NAME: "operations-engineering" | |
jobs: | |
check-diff: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
if: ${{ github.actor != 'dependabot[bot]' }} | |
steps: | |
- name: Checkout PR code | |
uses: actions/checkout@v4 | |
- run: | | |
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/* | |
- name: owner of PR | |
run: | | |
echo "$PR_OWNER" | |
- name: Run git diff against repository | |
run: | | |
git diff origin/main HEAD > changes | |
- name: Auto-approval check | |
id: approve_pr_check | |
uses: ministryofjustice/cloud-platform-doc-checker@main | |
env: | |
GITHUB_TOKEN: ${{ secrets.MOJ_AUTO_APPROVE_WRITE_BOT_PAT }} | |
- name: Approving PR | |
uses: hmarr/auto-approve-action@f0939ea97e9205ef24d872e76833fa908a770363 # v4.0.0 | |
if: steps.approve_pr_check.outputs.review_pr == 'true' | |
with: | |
github-token: "${{ secrets.MOJ_AUTO_APPROVE_WRITE_BOT_PAT }}" |