Skip to content

Commit

Permalink
Test Changes for PR (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahernandez411 authored Feb 5, 2024
1 parent 8984cfc commit 5ab59a4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test-on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
if: always()
uses: ./
with:
github-pat: ${{ secrets.GITHUB_TOKEN }}
save-to-artifact: "true"
save-to-branch: "false"
save-to-wiki: "false"
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
WORKFLOWS.md
wiki
.env
.vscode
Expand Down
14 changes: 13 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -42,6 +49,7 @@ runs:
with:
repository: ${{ github.repository }}.wiki
path: wiki
token: ${{ inputs.github-pat }}

- name: Document Workflows
shell: python
Expand Down Expand Up @@ -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
Expand All @@ -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"
Expand Down

0 comments on commit 5ab59a4

Please sign in to comment.