ci: act on push to main #65
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: Render Badges | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| id-token: write | |
| contents: write | |
| concurrency: | |
| group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}" | |
| cancel-in-progress: true | |
| jobs: | |
| render_badges: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| name: Check out repository to the runner | |
| with: | |
| ref: ${{ github.head_ref }} | |
| fetch-depth: 5 | |
| - uses: webfactory/ssh-agent@v0.9.0 | |
| with: | |
| ssh-private-key: ${{ secrets.FACSIMILAB_BOT_SSHKEY }} | |
| - name: render, commit, and push | |
| run: | | |
| bash render_badges.sh | |
| git config --local user.email "195262995+facsimilab-bot@users.noreply.github.com" | |
| git config --local user.name "FacsimiLab [Bot]" | |
| git config --local user.signingkey "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAEjI+PVQQhQjLVRmB6NnDJhqXKaVjzcr4KG1vqMkd2m FacsimiLab [Bot]" | |
| git config --local gpg.format ssh | |
| git config --local commit.gpgsign true | |
| git config --local tag.gpgSign true | |
| if [ -n "$(git status --porcelain)" ]; then | |
| git commit -a -S -m "ci: Render themed badges" | |
| else | |
| echo "No changes to commit" | |
| fi | |
| git push |