Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat: Support optional env secrets #360

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Zeko369
Copy link

@Zeko369 Zeko369 commented Jun 27, 2023

Closes #359

This PR allows specifying optional env secrets with - FOO? syntax

Example

In the following example the app won't build without RAILS_MASTER_KEY env variable being provided but will work both with and without FOO?

env:
  secrets:
    - RAILS_MASTER_KEY
    - FOO?

Todos

  • Think about overriding (i.e. if we have FOO in deploy.yml and FOO? in deploy.stage.yml, what's the output) comment here
  • Finish specs

@Zeko369 Zeko369 changed the title Support optional env secrets feat: Support optional env secrets Jun 27, 2023
@xiaohui-zhangxh
Copy link
Contributor

Good idea, now I have to write them like this:

env:
  secrets:
    - RAILS_MASTER_KEY
  <% if ENV['FOO'].to_s != '' %>
    - FOO
  <% end %>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support optional secrets
2 participants