Updates review date #103
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.GH_BOT_PAT_TOKEN }} | |
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.OPS_BOT_TOKEN }} | |
- name: Approving PR | |
uses: hmarr/auto-approve-action@v3 | |
if: steps.approve_pr_check.outputs.review_pr == 'true' | |
with: | |
github-token: "${{ secrets.OPS_BOT_TOKEN }}" |