Implemented commit signing for docs action #10
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: Build Docs | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'fastlane/**/*' | |
- 'scripts/generate-readme.sh' | |
- '.github/workflows/docs.yml' | |
jobs: | |
build: | |
permissions: | |
id-token: write # Enable OIDC | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Import bot's GPG key for signing commits | |
id: import-gpg | |
uses: crazy-max/ghaction-import-gpg@v6 | |
with: | |
gpg_private_key: ${{ secrets.BOT_GPG_PRIVATE_KEY }} | |
passphrase: ${{ secrets.BOT_GPG_PASSPHRASE }} | |
git_config_global: true | |
git_user_signingkey: true | |
git_commit_gpgsign: true | |
- name: Generate Readme | |
run: bash ${GITHUB_WORKSPACE}/scripts/generate-readme.sh | |
- name: Commit & Push | |
run: | | |
git add . | |
git commit -S --message="Overwritten by Github Actions" | |
git push |