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

FIX: More bugs in Manual Deploy Workflow #190

Merged
merged 1 commit into from
Nov 15, 2023
Merged

Conversation

mzappitello
Copy link
Contributor

  • Inputs need to be passed in from the workflow dispatch to the base workflow as booleans, so use a fromJson function to flip them.

  • Rename the env-name input to environment so that it matches with the workflow dispatch name.

  • Pass the environment string, not the name of the variable.

  • Add prod to list of environments we can change the task count for.

* Inputs need to be passed in from the workflow dispatch to the base
  workflow as booleans, so use a fromJson function to flip them.
* Rename the env-name input to environment so that it matches with the
  workflow dispatch name.
* Pass the environment string, not the name of the variable.

* Add prod to list of environments we can change the task count for.
@@ -9,6 +9,7 @@ on:
options:
- dev
- staging
- prod
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can change the task count for prod now.

env-name:
environment:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename this input, with cascading changes in the deploy workflows that call deploy-base.yaml

deploy-tableau-publisher: github.envent.inputs.deploy-tableau-publisher
# pass the inputs from the workflow dispatch through to the deploy base. the booleans are
# converted to strings, so flip them back using fromJson function
environment: ${{ github.event.inputs.environment }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i was passing the string of the variable name before 😵‍💫

Comment on lines +35 to +37
deploy-ingestion: ${{ fromJson(github.event.inputs.deploy-ingestion) }}
deploy-rail-pm: ${{ fromJson(github.event.inputs.deploy-rail-pm) }}
deploy-tableau-publisher: ${{ fromJson(github.event.inputs.deploy-tableau-publisher) }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using fromJson converts these from strings back to bools.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would you want the fromJson on the inside or the outside of ${{..}} here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

expressions go inside.

https://docs.github.com/en/actions/learn-github-actions/expressions#example-returning-a-json-data-type

i still find all of the syntax rules a bit hard to follow, but i'm sure they stem from some weird backend interpreter they have to use.

Copy link
Collaborator

@rymarczy rymarczy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question, but otherwise LGTM

@mzappitello mzappitello merged commit 5cb8c57 into main Nov 15, 2023
2 checks passed
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.

2 participants