bgrand-ch
bgrand-ch

Reputation: 1278

How to concatenate secrets into workflow action on GitHub?

I would like to concatenate multiple secrets into my workflow action on GitHub.

The example that comes to mind would be to create a full path from folder to filename.

Upvotes: 26

Views: 25926

Answers (1)

bgrand-ch
bgrand-ch

Reputation: 1278

To concatenate secrets into a workflow action on GitHub:

${{ format('{0}/{1}.{2}', secrets.FOLDER, secrets.FILENAME, secrets.EXT) }}

Sources: https://docs.github.com/en/actions/learn-github-actions/expressions#format

Upvotes: 54

Related Questions