included auto conflict already for the first part #3
This file contains 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: Auto Commit Changes | |
on: | |
pull_request: | |
types: [opened] | |
branches-ignore: | |
- 'dev/**' | |
permissions: | |
packages: read | |
contents: write | |
pull-requests: write | |
repository-projects: write | |
jobs: | |
auto-commit: | |
if: ${{!startsWith(github.head_ref, 'dev/')}} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
ref: main | |
- name: Set up Git | |
run: | | |
git config --global user.name 'Alice[bot]' | |
git config --global user.email 'Alice[bot]@wonderland.com' | |
- name: Make changes to packing_list.md | |
run: | | |
echo "[] Alice's personal toothbrush" >> packing_list.md | |
git add packing_list.md | |
git commit -m "Auto-update packing_list.md with new item" | |
- name: Push changes to main branch | |
run: | | |
git push origin main |