Skip to content

Create PR with README and Docs update #71

Create PR with README and Docs update

Create PR with README and Docs update #71

name: Create PR with README and Docs update
on:
schedule:
- cron: '0 8 * * 0' # Runs at 08:00 UTC every Sunday
workflow_dispatch: # Manual trigger
jobs:
create-pr:
name: "Create Pull Request"
permissions:
actions: read
contents: write
pages: write
pull-requests: write
id-token: write
uses: ./.github/workflows/run-tests.yaml
secrets: inherit
with:
commit_report: 'Docs'
approve-pr:
name: "Approve and Merge PR"
permissions:
pull-requests: write
contents: read
runs-on: ubuntu-latest
needs: create-pr
if: ${{ needs.create-pr.outputs.pull_request_number }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: main
- name: Approve Pull Request
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "Pull Request Number - ${{ needs.create-pr.outputs.pull_request_number }}"
gh pr review ${{ needs.create-pr.outputs.pull_request_number }} --approve
- name: Enable Pull Request Automerge
run: gh pr merge --merge --auto "${{ needs.create-pr.outputs.pull_request_number }}"
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}