Update PKGBUILD #4
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: 'Update Carch-X Submodule' | |
on: | |
push: | |
branches: | |
- 'main' | |
paths: | |
- '**' | |
workflow_dispatch: | |
permissions: | |
contents: write | |
actions: read | |
jobs: | |
update-submodule: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout carch repository | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set Git identity | |
run: | | |
git config --global user.name "GitHub Actions" | |
git config --global user.email "[email protected]" | |
- name: Initialize and update carch-x submodule | |
run: | | |
git submodule init | |
git submodule update --remote carch-x | |
- name: Check for changes in carch-x submodule | |
run: | | |
if git diff --exit-code carch-x; then | |
echo "No changes in carch-x submodule." | |
else | |
echo "carch-x submodule has changes" | |
fi | |
- name: Commit and push changes to the carch repository | |
run: | | |
git add carch-x | |
git commit -m "Update carch-x submodule" || echo "No changes to commit" | |
git push origin main | |