Skip to content

Commit 7e529a8

Browse files
Fix root readme github workflow (#14)
* Fix root readme github workflow * Fix root readme github workflow
1 parent 2cf23da commit 7e529a8

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/create-root-readme.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: create-root-readme
22

33
on:
44
workflow_run:
5-
workflows: ["generate-terraform-docs"] # Runs after completion of generate-terraform-docs workflow
5+
workflows: [ "generate-terraform-docs" ] # Runs after completion of generate-terraform-docs workflow
66
types:
77
- completed
88

@@ -16,6 +16,13 @@ jobs:
1616
- name: Check out the repository
1717
uses: actions/checkout@v4
1818

19+
- name: Token generator
20+
uses: githubofkrishnadhas/github-access-using-githubapp@v2
21+
id: token-generation
22+
with:
23+
github_app_id: ${{ secrets.TOKEN_GENERATOR_APPID }}
24+
github_app_private_key: ${{ secrets.TOKEN_GENERATOR_PRIVATE_KEY }}
25+
1926
- name: Ensure tree command is installed
2027
run: sudo apt update && sudo apt-get install -y tree
2128

@@ -24,9 +31,12 @@ jobs:
2431
bash create-readme.sh
2532
2633
- name: Commit and Push Changes
34+
env:
35+
GITHUB_TOKEN: ${{ steps.token-generation.outputs.token }}
2736
run: |
2837
git config user.name 'github-actions'
2938
git config user.email '[email protected]'
3039
git add .
3140
git commit -m "Update documentation"
41+
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/devwithkrishna/azure-terraform-modules.git
3242
git push

0 commit comments

Comments
 (0)