cloudformation-guard
cloudformation-guard copied to clipboard
[github action] action fails - gh auth login
Describe the issue
My github repository is private.
Github token for workflows is created https://docs.github.com/en/actions/concepts/security/github_token
The action is failing
name: Cloudformation - Validate
on:
pull_request:
permissions:
contents: read
issues: read
checks: write
pull-requests: write
id-token: write
env:
AWS_REGION: eu-central-1
jobs:
cfn-aguard:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Run cfn-guard
uses: aws-cloudformation/[email protected]
with:
rules: './cf_rules'
data: './cf_templates'
analyze: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Operating System: [Ubuntu]
Cc @joshfried-aws @dannyvassallo
https://github.com/aws-cloudformation/cloudformation-guard/blob/main/action%2FREADME.md
Try mirroring the readme examples.
It's been a minute but iirc the way I designed this you just need to supply GH_TOKEN.