Skip to content

Several CI/Workflow changes and fixes #208

Several CI/Workflow changes and fixes

Several CI/Workflow changes and fixes #208

name: Update From Submodule
permissions:
contents: write
on:
pull_request_target:
types: [opened, synchronize]
branches:
- main
workflow_dispatch:
jobs:
update-files:
if: github.actor == 'renovate[bot]' && startsWith(github.event.pull_request.head.ref, 'renovate/submodules-')
runs-on: ubuntu-latest
steps:
- name: Checkout pull request branch with submodules
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
# Checkout the repository at the merge commit
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
submodules: true
- name: Validate PR source branch
run: |
if [[ ${{ github.event.pull_request.head.repo.full_name }} != '${{ github.repository }}' ]]; then
echo "Untrusted repository detected! Exiting.";
exit 1;
fi
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec # v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
fingerprint: "F768450FB05B817D0B4BC26FB9B6A9B428C8676A"
trust_level: 5
- name: Set up Python
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6
with:
python-version: '3.x'
- name: Run repo update script
run: python update_repo.py
- name: Run CHANGELOG update script
run: bash update-changelog.bash
- name: Commit and push changes
run: |
git add .
git commit -m "Update files based on submodule changes"
git pull --rebase origin ${{ github.event.pull_request.head.ref }}
git push origin HEAD:${{ github.event.pull_request.head.ref }}