Skip to content

Allow repository to be used in GitHub Actions - #4

Merged
allejo merged 22 commits into
mainfrom
feat/gh-action
Mar 27, 2026
Merged

Allow repository to be used in GitHub Actions#4
allejo merged 22 commits into
mainfrom
feat/gh-action

Conversation

@allejo

@allejo allejo commented Mar 3, 2026

Copy link
Copy Markdown
Member

Add an action.yml file to this repository so it can be used as a step in your GitHub Actions workflow. Add documentation for the CLI's -json flag.

Auto-commit updated documentation

Automatically regenerate and commit documentation whenever Terraform files change on the main branch.

on:
  push:
    branches: [main]
    paths: ['**.tf']

jobs:
  docs:
    runs-on: ubuntu-latest
    permissions:
      contents: write
    steps:
      - uses: actions/checkout@v6
      - uses: FriendsOfTerraform/tfdocs-extras@main
        with:
          directories: |
            ./modules/aws/vpc
            ./modules/aws/s3
          commit: true
          commit_author: 'github-actions[bot] <github-actions[bot]@users.noreply.github.com>'

Enforce up-to-date documentation in pull requests

Fail the CI check if a pull request contains Terraform changes without updated documentation.

on:
  pull_request:
    paths: ['**.tf']

jobs:
  docs:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: FriendsOfTerraform/tfdocs-extras@main
        with:
          directories: |
            ./modules/aws/vpc
            ./modules/aws/s3
            ./modules/azure/*
            ./modules/vault/*
          fail_on_diff: true

Use the JSON output in a downstream step

- uses: actions/checkout@v6
- uses: FriendsOfTerraform/tfdocs-extras@main
  id: tfdocs
  with:
    directories: ./modules/aws/vpc
- run: echo '${{ steps.tfdocs.outputs.result }}'

Demo

FriendsOfTerraform/modules#59

This comment was marked as outdated.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread action.yml Outdated
Comment thread action.yml Outdated
Comment thread action.yml Outdated
Comment thread README.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread action.yml Outdated
Comment thread README.md Outdated
@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as off-topic.

@allejo
allejo requested a review from Copilot March 27, 2026 07:31
@github-actions

This comment was marked as outdated.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread action.yml Outdated
Comment thread .github/workflows/ci.yml
Comment thread action.yml Outdated
Comment thread action.yml Outdated
Comment thread action.yml Outdated
Comment thread action.yml Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions

This comment was marked as outdated.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/ci.yml
Comment thread action.yml Outdated
Comment thread action.yml
Comment thread action.yml
Comment thread README.md
@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@github-actions

Copy link
Copy Markdown

Super-linter summary

Language Validation result
CHECKOV Pass ✅
GITHUB_ACTIONS Pass ✅
GITHUB_ACTIONS_ZIZMOR Fail ❌
GITLEAKS Pass ✅
GIT_MERGE_CONFLICT_MARKERS Pass ✅
GO Fail ❌
MARKDOWN Fail ❌
YAML Pass ✅
YAML_PRETTIER Pass ✅

Super-linter detected linting errors

For more information, see the GitHub Actions workflow run

Powered by Super-linter

GITHUB_ACTIONS_ZIZMOR
�[1m�[91merror[unpinned-uses]�[0m�[1m: unpinned action reference�[0m
  �[1m�[94m--> �[0m/github/workspace/.github/workflows/ci.yml:16:15
   �[1m�[94m|�[0m
�[1m�[94m16�[0m �[1m�[94m|�[0m       - uses: actions/checkout@v6
   �[1m�[94m|�[0m               �[1m�[91m^^^^^^^^^^^^^^^^^^^�[0m �[1m�[91maction is not pinned to a hash (required by blanket policy)�[0m
   �[1m�[94m|�[0m
   �[1m�[94m= �[0m�[1mnote�[0m: audit confidence → High
   �[1m�[94m= �[0m�[1mnote�[0m: this finding has an auto-fix
   �[1m�[94m= �[0m�[1mhelp�[0m: audit documentation → �[32mhttps://docs.zizmor.sh/audits/#unpinned-uses�[39m

�[1m�[91merror[unpinned-uses]�[0m�[1m: unpinned action reference�[0m
  �[1m�[94m--> �[0m/github/workspace/.github/workflows/ci.yml:21:15
   �[1m�[94m|�[0m
�[1m�[94m21�[0m �[1m�[94m|�[0m         uses: actions/setup-go@v6
   �[1m�[94m|�[0m               �[1m�[91m^^^^^^^^^^^^^^^^^^^�[0m �[1m�[91maction is not pinned to a hash (required by blanket policy)�[0m
   �[1m�[94m|�[0m
   �[1m�[94m= �[0m�[1mnote�[0m: audit confidence → High
   �[1m�[94m= �[0m�[1mnote�[0m: this finding has an auto-fix
   �[1m�[94m= �[0m�[1mhelp�[0m: audit documentation → �[32mhttps://docs.zizmor.sh/audits/#unpinned-uses�[39m

�[1m�[91merror[unpinned-uses]�[0m�[1m: unpinned action reference�[0m
  �[1m�[94m--> �[0m/github/workspace/.github/workflows/ci.yml:37:15
   �[1m�[94m|�[0m
�[1m�[94m37�[0m �[1m�[94m|�[0m       - uses: actions/checkout@v6
   �[1m�[94m|�[0m               �[1m�[91m^^^^^^^^^^^^^^^^^^^�[0m �[1m�[91maction is not pinned to a hash (required by blanket policy)�[0m
   �[1m�[94m|�[0m
   �[1m�[94m= �[0m�[1mnote�[0m: audit confidence → High
   �[1m�[94m= �[0m�[1mnote�[0m: this finding has an auto-fix
   �[1m�[94m= �[0m�[1mhelp�[0m: audit documentation → �[32mhttps://docs.zizmor.sh/audits/#unpinned-uses�[39m

�[1m�[91merror[unpinned-uses]�[0m�[1m: unpinned action reference�[0m
  �[1m�[94m--> �[0m/github/workspace/.github/workflows/ci.yml:42:15
   �[1m�[94m|�[0m
�[1m�[94m42�[0m �[1m�[94m|�[0m         uses: actions/setup-go@v6
   �[1m�[94m|�[0m               �[1m�[91m^^^^^^^^^^^^^^^^^^^�[0m �[1m�[91maction is not pinned to a hash (required by blanket policy)�[0m
   �[1m�[94m|�[0m
   �[1m�[94m= �[0m�[1mnote�[0m: audit confidence → High
   �[1m�[94m= �[0m�[1mnote�[0m: this finding has an auto-fix
   �[1m�[94m= �[0m�[1mhelp�[0m: audit documentation → �[32mhttps://docs.zizmor.sh/audits/#unpinned-uses�[39m

�[1m�[91merror[unpinned-uses]�[0m�[1m: unpinned action reference�[0m
  �[1m�[94m--> �[0m/github/workspace/.github/workflows/ci.yml:66:15
   �[1m�[94m|�[0m
�[1m�[94m66�[0m �[1m�[94m|�[0m       - uses: actions/checkout@v6
   �[1m�[94m|�[0m               �[1m�[91m^^^^^^^^^^^^^^^^^^^�[0m �[1m�[91maction is not pinned to a hash (required by blanket policy)�[0m
   �[1m�[94m|�[0m
   �[1m�[94m= �[0m�[1mnote�[0m: audit confidence → High
   �[1m�[94m= �[0m�[1mnote�[0m: this finding has an auto-fix
   �[1m�[94m= �[0m�[1mhelp�[0m: audit documentation → �[32mhttps://docs.zizmor.sh/audits/#unpinned-uses�[39m

�[1m�[91merror[unpinned-uses]�[0m�[1m: unpinned action reference�[0m
  �[1m�[94m--> �[0m/github/workspace/.github/workflows/ci.yml:75:15
   �[1m�[94m|�[0m
�[1m�[94m75�[0m �[1m�[94m|�[0m         uses: super-linter/super-linter@v8.5.0
   �[1m�[94m|�[0m               �[1m�[91m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^�[0m �[1m�[91maction is not pinned to a hash (required by blanket policy)�[0m
   �[1m�[94m|�[0m
   �[1m�[94m= �[0m�[1mnote�[0m: audit confidence → High
   �[1m�[94m= �[0m�[1mnote�[0m: this finding has an auto-fix
   �[1m�[94m= �[0m�[1mhelp�[0m: audit documentation → �[32mhttps://docs.zizmor.sh/audits/#unpinned-uses�[39m

�[1m�[91merror[cache-poisoning]�[0m�[1m: runtime artifacts potentially vulnerable to a cache poisoning attack�[0m
  �[1m�[94m--> �[0m/github/workspace/.github/workflows/ci.yml:21:9
   �[1m�[94m|�[0m
�[1m�[94m 3�[0m �[1m�[94m|�[0m �[1m�[94m/�[0m on:
�[1m�[94m 4�[0m �[1m�[94m|�[0m �[1m�[94m|�[0m   push:
�[1m�[94m 5�[0m �[1m�[94m|�[0m �[1m�[94m|�[0m     tags-ignore:
�[1m�[94m 6�[0m �[1m�[94m|�[0m �[1m�[94m|�[0m       - '*'
�[1m�[94m 7�[0m �[1m�[94m|�[0m �[1m�[94m|�[0m   pull_request:
   �[1m�[94m|�[0m �[1m�[94m|_______________-�[0m �[1m�[94mgenerally used when publishing artifacts generated at runtime�[0m
�[1m�[94m...�[0m
�[1m�[94m21�[0m �[1m�[94m|�[0m           uses: actions/setup-go@v6
   �[1m�[94m|�[0m           �[1m�[91m^^^^^^^^^^^^^^^^^^^^^^^^^�[0m �[1m�[91menables caching by default�[0m
   �[1m�[94m|�[0m
   �[1m�[94m= �[0m�[1mnote�[0m: audit confidence → Low
   �[1m�[94m= �[0m�[1mnote�[0m: this finding has an auto-fix
   �[1m�[94m= �[0m�[1mhelp�[0m: audit documentation → �[32mhttps://docs.zizmor.sh/audits/#cache-poisoning�[39m

�[1m�[91merror[cache-poisoning]�[0m�[1m: runtime artifacts potentially vulnerable to a cache poisoning attack�[0m
  �[1m�[94m--> �[0m/github/workspace/.github/workflows/ci.yml:42:9
   �[1m�[94m|�[0m
�[1m�[94m 3�[0m �[1m�[94m|�[0m �[1m�[94m/�[0m on:
�[1m�[94m 4�[0m �[1m�[94m|�[0m �[1m�[94m|�[0m   push:
�[1m�[94m 5�[0m �[1m�[94m|�[0m �[1m�[94m|�[0m     tags-ignore:
�[1m�[94m 6�[0m �[1m�[94m|�[0m �[1m�[94m|�[0m       - '*'
�[1m�[94m 7�[0m �[1m�[94m|�[0m �[1m�[94m|�[0m   pull_request:
   �[1m�[94m|�[0m �[1m�[94m|_______________-�[0m �[1m�[94mgenerally used when publishing artifacts generated at runtime�[0m
�[1m�[94m...�[0m
�[1m�[94m42�[0m �[1m�[94m|�[0m           uses: actions/setup-go@v6
   �[1m�[94m|�[0m           �[1m�[91m^^^^^^^^^^^^^^^^^^^^^^^^^�[0m �[1m�[91menables caching by default�[0m
   �[1m�[94m|�[0m
   �[1m�[94m= �[0m�[1mnote�[0m: audit confidence → Low
   �[1m�[94m= �[0m�[1mnote�[0m: this finding has an auto-fix
   �[1m�[94m= �[0m�[1mhelp�[0m: audit documentation → �[32mhttps://docs.zizmor.sh/audits/#cache-poisoning�[39m

�[1m�[91merror[unpinned-uses]�[0m�[1m: unpinned action reference�[0m
  �[1m�[94m--> �[0m/github/workspace/.github/workflows/release.yml:40:15
   �[1m�[94m|�[0m
�[1m�[94m40�[0m �[1m�[94m|�[0m       - uses: actions/checkout@v6
   �[1m�[94m|�[0m               �[1m�[91m^^^^^^^^^^^^^^^^^^^�[0m �[1m�[91maction is not pinned to a hash (required by blanket policy)�[0m
   �[1m�[94m|�[0m
   �[1m�[94m= �[0m�[1mnote�[0m: audit confidence → High
   �[1m�[94m= �[0m�[1mnote�[0m: this finding has an auto-fix
   �[1m�[94m= �[0m�[1mhelp�[0m: audit documentation → �[32mhttps://docs.zizmor.sh/audits/#unpinned-uses�[39m

�[1m�[91merror[unpinned-uses]�[0m�[1m: unpinned action reference�[0m
  �[1m�[94m--> �[0m/github/workspace/.github/workflows/release.yml:45:15
   �[1m�[94m|�[0m
�[1m�[94m45�[0m �[1m�[94m|�[0m         uses: actions/setup-go@v6
   �[1m�[94m|�[0m               �[1m�[91m^^^^^^^^^^^^^^^^^^^�[0m �[1m�[91maction is not pinned to a hash (required by blanket policy)�[0m
   �[1m�[94m|�[0m
   �[1m�[94m= �[0m�[1mnote�[0m: audit confidence → High
   �[1m�[94m= �[0m�[1mnote�[0m: this finding has an auto-fix
   �[1m�[94m= �[0m�[1mhelp�[0m: audit documentation → �[32mhttps://docs.zizmor.sh/audits/#unpinned-uses�[39m

�[1m�[91merror[unpinned-uses]�[0m�[1m: unpinned action reference�[0m
  �[1m�[94m--> �[0m/github/workspace/.github/workflows/release.yml:62:15
   �[1m�[94m|�[0m
�[1m�[94m62�[0m �[1m�[94m|�[0m         uses: actions/upload-artifact@v5
   �[1m�[94m|�[0m               �[1m�[91m^^^^^^^^^^^^^^^^^^^^^^^^^^�[0m �[1m�[91maction is not pinned to a hash (required by blanket policy)�[0m
   �[1m�[94m|�[0m
   �[1m�[94m= �[0m�[1mnote�[0m: audit confidence → High
   �[1m�[94m= �[0m�[1mnote�[0m: this finding has an auto-fix
   �[1m�[94m= �[0m�[1mhelp�[0m: audit documentation → �[32mhttps://docs.zizmor.sh/audits/#unpinned-uses�[39m

�[1m�[91merror[unpinned-uses]�[0m�[1m: unpinned action reference�[0m
  �[1m�[94m--> �[0m/github/workspace/.github/workflows/release.yml:75:15
   �[1m�[94m|�[0m
�[1m�[94m75�[0m �[1m�[94m|�[0m       - uses: actions/checkout@v6
   �[1m�[94m|�[0m               �[1m�[91m^^^^^^^^^^^^^^^^^^^�[0m �[1m�[91maction is not pinned to a hash (required by blanket policy)�[0m
   �[1m�[94m|�[0m
   �[1m�[94m= �[0m�[1mnote�[0m: audit confidence → High
   �[1m�[94m= �[0m�[1mnote�[0m: this finding has an auto-fix
   �[1m�[94m= �[0m�[1mhelp�[0m: audit documentation → �[32mhttps://docs.zizmor.sh/audits/#unpinned-uses�[39m

�[1m�[91merror[unpinned-uses]�[0m�[1m: unpinned action reference�[0m
  �[1m�[94m--> �[0m/github/workspace/.github/workflows/release.yml:80:15
   �[1m�[94m|�[0m
�[1m�[94m80�[0m �[1m�[94m|�[0m         uses: actions/download-artifact@v6
   �[1m�[94m|�[0m               �[1m�[91m^^^^^^^^^^^^^^^^^^^^^^^^^^^^�[0m �[1m�[91maction is not pinned to a hash (required by blanket policy)�[0m
   �[1m�[94m|�[0m
   �[1m�[94m= �[0m�[1mnote�[0m: audit confidence → High
   �[1m�[94m= �[0m�[1mnote�[0m: this finding has an auto-fix
   �[1m�[94m= �[0m�[1mhelp�[0m: audit documentation → �[32mhttps://docs.zizmor.sh/audits/#unpinned-uses�[39m

�[1m�[91merror[unpinned-uses]�[0m�[1m: unpinned action reference�[0m
  �[1m�[94m--> �[0m/github/workspace/.github/workflows/release.yml:96:15
   �[1m�[94m|�[0m
�[1m�[94m96�[0m �[1m�[94m|�[0m         uses: softprops/action-gh-release@v2
   �[1m�[94m|�[0m               �[1m�[91m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^�[0m �[1m�[91maction is not pinned to a hash (required by blanket policy)�[0m
   �[1m�[94m|�[0m
   �[1m�[94m= �[0m�[1mnote�[0m: audit confidence → High
   �[1m�[94m= �[0m�[1mnote�[0m: this finding has an auto-fix
   �[1m�[94m= �[0m�[1mhelp�[0m: audit documentation → �[32mhttps://docs.zizmor.sh/audits/#unpinned-uses�[39m

�[32m32�[39m findings (�[1m�[93m18�[39m suppressed, �[92m14�[39m fixable�[0m): �[35m0�[39m informational, �[36m0�[39m low, �[33m0�[39m medium, �[31m14�[39m high🌈 zizmor v1.22.0
�[32m INFO�[0m �[1maudit�[0m�[2m:�[0m �[2mzizmor�[0m�[2m:�[0m 🌈 completed /github/workspace/.github/workflows/ci.yml
�[32m INFO�[0m �[1maudit�[0m�[2m:�[0m �[2mzizmor�[0m�[2m:�[0m 🌈 completed /github/workspace/.github/workflows/release.yml
�[32m INFO�[0m �[1maudit�[0m�[2m:�[0m �[2mzizmor�[0m�[2m:�[0m 🌈 completed /github/workspace/action.yml
GO
0 issues.level=error msg="[linters_context] typechecking error: named files must all be in one directory; have /github/workspace and /github/workspace/cmd"
MARKDOWN
/github/workspace/README.md:9:401 error MD013/line-length Line length [Expected: 400; Actual: 467]
/github/workspace/README.md:11:401 error MD013/line-length Line length [Expected: 400; Actual: 507]
/github/workspace/README.md:416:401 error MD013/line-length Line length [Expected: 400; Actual: 477]

@allejo
allejo merged commit f6a6243 into main Mar 27, 2026
8 of 12 checks passed
@allejo
allejo deleted the feat/gh-action branch March 27, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants