-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8984cfc
commit 5ab59a4
Showing
3 changed files
with
14 additions
and
2 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
WORKFLOWS.md | ||
wiki | ||
.env | ||
.vscode | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,9 @@ name: Document Action Workflows in Repo Wiki | |
description: Reads the workflow files in the repo and creates a wiki page with the workflow details. | ||
|
||
inputs: | ||
github-pat: | ||
description: The github personal access token used for interactions with github | ||
required: true | ||
save-to-artifact: | ||
description: If true, save to documentation as an artifact | ||
required: true | ||
|
@@ -13,6 +16,10 @@ inputs: | |
description: If true, save to documentation to repository's wiki | ||
required: true | ||
|
||
permissions: | ||
contents: write | ||
wikis: write | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
|
@@ -42,6 +49,7 @@ runs: | |
with: | ||
repository: ${{ github.repository }}.wiki | ||
path: wiki | ||
token: ${{ inputs.github-pat }} | ||
|
||
- name: Document Workflows | ||
shell: python | ||
|
@@ -289,7 +297,9 @@ runs: | |
cd wiki | ||
git config --global user.name "action-workflow-documenter" | ||
git config --global user.email "[email protected]" | ||
git add . | ||
git remote set-url origin https://x-access-token:${{ inputs.github-pat }}@github.com/$GITHUB_REPOSITORY | ||
git add . | ||
git diff-index --quiet HEAD || git commit -m "Update wiki with latest workflow documentation" && git push | ||
- name: Save Changes to Branch | ||
|
@@ -299,6 +309,8 @@ runs: | |
set -x | ||
git config --global user.name "action-workflow-documenter" | ||
git config --global user.email "[email protected]" | ||
git remote set-url origin https://x-access-token:${{ inputs.github-pat }}@github.com/$GITHUB_REPOSITORY | ||
git add . | ||
git checkout -b actions-documentation | ||
git commit -m "Add actions documentation" | ||
|