Created
January 29, 2024 11:59
-
-
Save kkarpieszuk/0d75b2f6adf09ff2291a5bbedd3e59f7 to your computer and use it in GitHub Desktop.
Resolve Conflicts adn Commit
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: 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