Skip to content

How to run multiple commands in one Github Actions Docker #26111

Answered by lee-dohm
baruchiro asked this question in Actions
Discussion options

You must be logged in to vote

There’s not necessarily a “right” or a “wrong” way to make these decisions. My personal opinion on the subjects:

  • args should be used to customize the behavior of an Action from one run to another
    • So if you have an Action that does something but you need it done two different ways in two separate Workflows, then an argument is probably the right choice
  • env should be used to create named values (that don’t need to be secure) that might be shared between Actions
    • Like if multiple Actions need to know where the DOCS_DIR is, this might be a valid use for an environment variable
  • If the code in an Action requires some tool or even fixed dependencies to do its job, I would typically build…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants