Add support for reusable workflows in setup-ci #354
chris3ware
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Trunk's code quality GitHub integration can be customised using a composite GitHub Action. But, secrets must be passed as inputs into this type of action. I'm not sure it's possible to tell trunk to fetch a repository secret and pass it as an input to the composite action - happy to be corrected though :-) Whereas a reusable workflows have access to the secrets context.
To give some context, here is a snippet from my composite action to set up AWS credentials and tflint for deep checking the AWS plugin
Running locally works providing I am logged in to AWS and the environment variables for
AWS_ACCESS_KEY_ID
,AWS_SECRET_ACCESS_KEY
,AWS_SESSION_TOKEN
are set and they are passed to the tflint definition in trunk.yaml:The problem I am trying to overcome is pulling the
role-to-assume
parameter of the aws-configure-credentials action from a repository secret in the setup-ci action so what I have working locally will also work in CI, without exposing the name of the role in the configuration.Reusable workflows also support token permissions, meaning the correct permissions (
id-token: write
) could be set for OIDC authentication.Beta Was this translation helpful? Give feedback.
All reactions