Skip to content

Instantly share code, notes, and snippets.

@kkarpieszuk
Created January 29, 2024 11:59
Show Gist options
  • Save kkarpieszuk/0d75b2f6adf09ff2291a5bbedd3e59f7 to your computer and use it in GitHub Desktop.
Save kkarpieszuk/0d75b2f6adf09ff2291a5bbedd3e59f7 to your computer and use it in GitHub Desktop.
Resolve Conflicts adn Commit
name: Resolve Conflicts and Commit
on:
pull_request:
types: [labeled]
jobs:
build-and-commit:
if: github.event.label.name == 'has-conflicts'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: '18'
- name: Install Dependencies
run: npm install
- name: Run Gulp Tasks
run: gulp scss && gulp js
- name: Commit changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add *.min.css *.css *.min.js
if git diff --staged --quiet; then
git commit -m "Automated conflict resolution and minification"
git push
else
echo "No changes to commit"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment