Skip to content

Commit

Permalink
Don't use GitHub App for documentation commits
Browse files Browse the repository at this point in the history
  • Loading branch information
baksetercx committed Dec 18, 2024
1 parent 213da12 commit 5327317
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 17 deletions.
19 changes: 5 additions & 14 deletions .github/workflows/generate-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,16 @@ concurrency:
group: '${{ github.workflow }}-${{ github.event_name }}'
cancel-in-progress: true

permissions:
contents: write

jobs:
generate-docs:
name: Generate action documentation
runs-on: elvia-runner
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Get GitHub App token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.GH_APP_ID }}
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}

- name: Generate docs
uses: 3lvia/gh-actions-docs@v1
with:
Expand All @@ -47,11 +38,11 @@ jobs:
exit 0
fi
git config user.email '${{ vars.GH_APP_USER_EMAIL }}'
git config user.name '${{ vars.GH_APP_USERNAME }}'
git config user.name 'github-actions[bot]'
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
git add README.md
git commit -m 'Update action documentation'
git push
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
GH_TOKEN: ${{ github.token }}
4 changes: 2 additions & 2 deletions .github/workflows/test-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -489,8 +489,8 @@ jobs:
- name: Check that secret was fetched successfully
run: |
if [[ -z '${{ env.APP_INSIGHTS_NAME }}' ]]; then
echo "Secret was not fetched."
echo 'Secret was not fetched.'
exit 1
else
echo "Secret was fetched successfully!"
echo 'Secret was fetched successfully!'
fi
2 changes: 1 addition & 1 deletion vault/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Vault
description: "Get secrets from Elvia's Vault."
description: "Get secrets from Elvia's Vault for use in GitHub Actions."
inputs:
system:
description: 'System name is used to log in to Vault using the correct role.'
Expand Down

0 comments on commit 5327317

Please sign in to comment.