render actions.yml Inputs/Outputs for README tables by Zheng-Bote #1
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: Repo - Actions In/Out in README | |
# description: Renders Markdown tables for inputs and outputs from actions.yml file. | |
# README.md: ## Inputs ## Outputs | |
# https://github.com/tj-actions/auto-doc | |
run-name: render actions.yml Inputs/Outputs for README tables by ${{ github.actor }} | |
on: | |
push: | |
branches: ["main"] | |
paths: | |
- "action.yml" | |
workflow_dispatch: | |
permissions: | |
checks: write | |
contents: write | |
jobs: | |
sync-assets: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
fetch-depth: 0 | |
- name: Run auto-doc | |
uses: tj-actions/[email protected] | |
- name: Run test | |
uses: tj-actions/remark@v3 | |
- name: Verify Changed files | |
uses: tj-actions/verify-changed-files@v20 | |
id: verify_changed_files | |
with: | |
files: | | |
README.md | |
- name: README.md changed | |
if: steps.verify_changed_files.outputs.files_changed == 'true' | |
run: | | |
echo "README.md has uncommitted changes" | |
#exit 1 | |
# https://github.com/ad-m/github-push-action | |
- name: Commit & Push | |
uses: Andro999b/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: main | |
force: true | |
message: "appended by Github Actions - ${date}" |