Update PyCon Lithuania #3
This file contains hidden or 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: Pull Request Conference Sort & All-contrib | |
| on: | |
| pull_request: | |
| paths: | |
| - '_data/conferences.yml' | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| sort: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.pull_request.head.ref }} | |
| repository: ${{ github.event.pull_request.head.repo.full_name }} | |
| - name: Setup Pixi | |
| uses: prefix-dev/[email protected] | |
| - name: Run sort command | |
| run: pixi run sort | |
| - name: Check and commit sort changes | |
| run: | | |
| if ! git diff --exit-code; then | |
| git config --global user.name 'github-actions[bot]' | |
| git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
| git add _data/* | |
| git commit -m "chore: sort conferences" | |
| git push | |
| fi | |
| add-contributor: | |
| runs-on: ubuntu-latest | |
| needs: sort | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.pull_request.head.ref }} | |
| repository: ${{ github.event.pull_request.head.repo.full_name }} | |
| - name: Setup Pixi | |
| uses: prefix-dev/[email protected] | |
| - name: Add contributor and commit if changed | |
| run: | | |
| PR_AUTHOR="${{ github.event.pull_request.user.login }}" | |
| pixi run install | |
| pixi run add $PR_AUTHOR conference | |
| if ! git diff --exit-code; then | |
| git config --global user.name 'github-actions[bot]' | |
| git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
| git add .all-contributorsrc README.md CONTRBUTING.md | |
| git commit -m "docs: add $PR_AUTHOR as contributor for conferences" | |
| git push | |
| fi |