Skip to content

Commit dae9b4c

Browse files
Create pr-sort
1 parent 98a32fa commit dae9b4c

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/pr-sort

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: PR Conference Sort
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- '_data/conferences.yml'
7+
8+
jobs:
9+
validate-and-sort:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
pull-requests: write
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
with:
19+
ref: ${{ github.event.pull_request.head.ref }}
20+
repository: ${{ github.event.pull_request.head.repo.full_name }}
21+
22+
- name: Setup Pixi
23+
uses: prefix-dev/[email protected]
24+
25+
- name: Run sort command
26+
run: pixi run sort
27+
28+
- name: Check for changes
29+
id: git-check
30+
run: |
31+
git diff --exit-code || echo "changes=true" >> $GITHUB_OUTPUT
32+
33+
- name: Commit changes to PR
34+
if: steps.git-check.outputs.changes == 'true'
35+
run: |
36+
git config --global user.name 'github-actions[bot]'
37+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
38+
git commit -am "chore: sort conferences"
39+
git push

0 commit comments

Comments
 (0)