Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Deprecated set-output issue (#4) #119

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: ci

on:
workflow_dispatch:
pull_request:

jobs:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
name: publish

on:
workflow_dispatch:
push:
branches:
- main
paths:
- .github/workflows/publish.yml
- Dockerfile
- action.yml
- src/docker-entrypoint.sh

env:
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: validate

on:
workflow_dispatch:
push:
branches:
- main
Expand Down Expand Up @@ -33,8 +34,22 @@ jobs:
sudo chmod 755 /usr/local/bin/gomplate

- name: Check README content based on action.yml
if: ${{ github.repository_owner == 'terraform-docs' }}
run: |
./scripts/update-readme.sh
if [ $(git status --porcelain | grep -c 'M README.md') -eq 1 ]; then
git diff
exit 1
fi

- name: Check README content based on action.yml
if: ${{ github.repository_owner != 'terraform-docs' }}
run: |
./scripts/update-readme.sh
if [ $(git status --porcelain | grep -c 'M README.md') -eq 1 ]; then
git config user.email "noreply.${{ github.actor }}@github.com"
git config user.name "${{ github.actor }}"
git add README.md
git commit -s -m "docs: README.md Updated"
git push
fi
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ jobs:
| indention | Indention level of Markdown sections [1, 2, 3, 4, 5] | `2` | false |
| output-file | File in module directory where the docs should be placed | `README.md` | false |
| output-format | terraform-docs format to generate content (see [all formats](https://github.com/terraform-docs/terraform-docs/blob/master/docs/FORMATS\_GUIDE.md)) (ignored if `config-file` is set) | `markdown table` | false |
| output-method | Method should be one of `replace`, `inject`, or `print` | `inject` | false |
| output-method | Method should be one of `replace`, `inject`, or `print`. Set as an empty string if `output.mode` and `output.file` are defined in config-file | `inject` | false |
| recursive | If true it will update submodules recursively | `false` | false |
| recursive-path | Submodules path to recursively update | `modules` | false |
| template | When provided will be used as the template if/when the `output-file` does not exist | `<!-- BEGIN_TF_DOCS -->\n{{ .Content }}\n<!-- END_TF_DOCS -->` | false |
| template | When provided will be used as the template if/when the `output-file` does not exist. Set as an empty string if `output.template` is defined in config-file | `<!-- BEGIN_TF_DOCS -->\n{{ .Content }}\n<!-- END_TF_DOCS -->` | false |
| working-dir | Comma separated list of directories to generate docs for (ignored if `atlantis-file` or `find-dir` is set) | `.` | false |

#### Output Method (output-method)
Expand Down
2 changes: 1 addition & 1 deletion src/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ fi
set +e
num_changed=$(git_status)
set -e
echo "num_changed=${num_changed}" >> $GITHUB_OUTPUT
echo "num_changed=${num_changed}" >> "$GITHUB_OUTPUT"

if [ "${INPUT_GIT_PUSH}" = "true" ]; then
git_commit
Expand Down