Skip to content

Commit

Permalink
Create auto-cl-update-atd.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
themanyfaceddemon authored Jun 26, 2024
1 parent 11f16a1 commit 87bfb52
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/auto-cl-update-atd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Auto CL update

on:
push:
branches:
- master

permissions:
contents: write
pull-requests: read

jobs:
post_merge_job:
name: Post-Merge Job
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/[email protected]

- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: '3.x'

- name: Get PR Information
id: pr_info
run: |
PR_NUMBER=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV
- name: Run post-merge script
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: python Tools/ATD/auto_cl.py "${{ env.GITHUB_TOKEN }}" "${{ github.repository }}" "${{ env.PR_NUMBER }}"

- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Commit changes
run: |
git add .
git commit -m "Auto cl update" || echo "No changes to commit"
- name: Push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} HEAD:master

0 comments on commit 87bfb52

Please sign in to comment.