Update PyCon Lithuania #4
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' | |
| types: | |
| - closed | |
| branches: | |
| - main | |
| jobs: | |
| process-merged-pr: | |
| if: github.event.pull_request.merged == true | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Pixi | |
| uses: prefix-dev/[email protected] | |
| - name: Create changes | |
| id: changes | |
| run: | | |
| # Create a new branch | |
| git checkout -b automated-updates-${{ github.event.pull_request.number }} | |
| # Run your commands | |
| pixi run sort | |
| PR_AUTHOR="${{ github.event.pull_request.user.login }}" | |
| pixi run install | |
| pixi run add $PR_AUTHOR conference | |
| # Check if there are changes | |
| if ! git diff --quiet; then | |
| echo "has_changes=true" >> $GITHUB_OUTPUT | |
| # Stage and commit changes | |
| git config --global user.name 'github-actions[bot]' | |
| git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
| git add _data/* .all-contributorsrc README.md CONTRBUTING.md | |
| git commit -m "chore: post-merge updates | |
| * Sort conferences | |
| * Add $PR_AUTHOR as contributor" | |
| else | |
| echo "has_changes=false" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Create Pull Request | |
| if: steps.changes.outputs.has_changes == 'true' | |
| uses: peter-evans/create-pull-request@v6 | |
| with: | |
| title: 'Automated updates from PR #${{ github.event.pull_request.number }}' | |
| body: | | |
| This PR was automatically created after merging #${{ github.event.pull_request.number }} | |
| Changes include: | |
| - Sorted conferences | |
| - Added @${{ github.event.pull_request.user.login }} as contributor | |
| Please review and merge these automated updates. | |
| branch: automated-updates-${{ github.event.pull_request.number }} | |
| delete-branch: true |