Update kubernetes-mixin digest to bdbf7f4 #15
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: Mixins | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
mixins: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/create-github-app-token@v1 | |
id: app-token | |
with: | |
app-id: ${{ vars.GH_APP_ID }} | |
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
token: ${{ steps.app-token.outputs.token }} | |
persist-credentials: true | |
- name: Render mixins | |
run: make | |
env: | |
JB_ARGS: update | |
- name: Get status | |
run: echo "changed=$(git status --short | grep -c "docs/")" >> "$GITHUB_OUTPUT" | |
id: status | |
- name: Push changes | |
if: ${{ github.actor == 'renovate[bot]' && steps.status.outputs.changed !=0 }} | |
env: | |
GH_TOKEN: ${{ steps.app-token.outputs.token }} | |
run: | | |
USER_ID=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id) | |
git add docs jsonnetfile.lock.json | |
git config --global user.name "${{ steps.app-token.outputs.app-slug }}[bot]" | |
git config --global user.email "${USER_ID}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>" | |
git commit -m "Update files after Renovate update" | |
git push origin HEAD:refs/heads/${{ github.event.pull_request.head.ref }} | |
- name: Detected changes | |
if: ${{ github.actor != 'renovate[bot]' && steps.status.outputs.changed !=0 }} | |
run: | | |
echo "::error::Detected changes in the rendered docs files. Please run 'make' locally and commit the changes." | |
git status --short docs | |
exit 1 |