Skip to content
New issue

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

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

Already on GitHub? # to your account

feat!: Add secrets input to workflow call #79

Merged
merged 1 commit into from
Jul 23, 2024
Merged

Conversation

staticaland
Copy link
Contributor

@staticaland staticaland commented Jul 23, 2024

In order to support running this reusable workflow from other organizations, secrets must be passed explicitly. It's not possible to use inherit.

Workflows that call reusable workflows in the same organization or enterprise can use the inherit keyword to implicitly pass the secrets.

Breaking change

This is a breaking change. You might encounter this error message if you don't change your caller workflows:

This job failed
Secret AWS_ROLE_ARN is required, but not provided while calling.

In caller workflows, you need to make this change:

-    uses: oslokommune/reusable-terraform-plan-apply/.github/workflows/reusable-terraform-plan-apply.yml@main
-    secrets: inherit
+    uses: oslokommune/reusable-terraform-plan-apply/.github/workflows/reusable-terraform-plan-apply.yml@main
+    secrets:
+      AGE_PUBLIC_KEY: ${{ secrets.AGE_PUBLIC_KEY }}
+      AGE_SECRET_KEY: ${{ secrets.AGE_SECRET_KEY }}
+      AWS_ROLE_ARN: ${{ secrets.AWS_ROLE_ARN }}
+      GOLDEN_PATH_IAC_PRIVATE_DEPLOY_KEY: ${{ secrets.GOLDEN_PATH_IAC_PRIVATE_DEPLOY_KEY }}

See this Slack discussion for more information.

@staticaland staticaland requested a review from a team as a code owner July 23, 2024 13:19
@staticaland staticaland merged commit d130e12 into main Jul 23, 2024
1 check passed
@staticaland staticaland deleted the secrets-workflow-call branch July 23, 2024 13:21
@github-actions github-actions bot mentioned this pull request Jul 23, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants