endjin / Endjin.RecommendedPractices.GitHubActions

Re-usable GitHub Action workflows and actions for our standardised CI process
Apache License 2.0
1 stars 1 forks source link

Enable passing arbitrary environment variables & secrets to re-usable workflow #8

Closed JamesDawson closed 1 year ago

JamesDawson commented 1 year ago

This feature provides a workaround for the following limitations:

  1. Unable to set environment variables on a job that calls a re-usable workflow
  2. Unable to reference secrets when specifying the inputs to a re-useable workflow

Using the native functionality to achieve both of the above scenarios, requires the re-useable workflow to have knowledge of any environment variables or secrets that a calling workflow may wish to reference. This is undesirable for a highly generalised re-usable workflow.

Also includes two new composite actions that encapsulate preparing and applying the specified environment variables and secrets.