[Submodule Update]: Bump submodules/dotfiles from cf0e94c
to 8f934fc
#9
Workflow file for this run
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 Submodule Files | |
on: | |
pull_request_target: | |
types: [opened, synchronize] | |
branches: | |
- main | |
permissions: | |
contents: write | |
jobs: | |
update-files: | |
if: github.actor == 'dependabot[bot]' && startsWith(github.event.pull_request.head.ref, 'dependabot/submodules/') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
# Checkout the repository at the merge commit | |
ref: ${{ github.event.pull_request.head.sha }} | |
submodules: true | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Import GPG key | |
run: | | |
echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --batch --import | |
echo "${{ secrets.GPG_PASSPHRASE }}" | gpg --batch --yes --passphrase-fd 0 --pinentry-mode loopback --edit-key F768450FB05B817D0B4BC26FB9B6A9B428C8676A trust quit | |
- name: Run update script | |
run: python update_repo.py | |
- name: Commit and push changes | |
env: | |
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email '[email protected]' | |
git config --global user.signingkey F768450FB05B817D0B4BC26FB9B6A9B428C8676A | |
git config --global commit.gpgSign true | |
git config --global gpg.program gpg | |
git add . | |
echo "$GPG_PASSPHRASE" | gpg --batch --yes --passphrase-fd 0 --pinentry-mode loopback --sign | |
git commit -m "Update files based on submodule changes" -S | |
git pull --rebase origin ${{ github.event.pull_request.head.ref }} | |
git push origin HEAD:${{ github.event.pull_request.head.ref }} |