Skip to content

Releases: BlobDevelopment/copy-and-replace-tokens

v2 - Fixed weirdness and allow for no target

26 Dec 00:08
6caa6d8

Choose a tag to compare

Previously the workflow was weird and actually required {USER} in your env. That's finally fixed. Alongside that, you no longer are required to specify a target. This will default to your source if not specified.

Release

30 Jun 02:56

Choose a tag to compare

Add to a workflow if you wish to copy a file and replace tokens inside of it.

Example usage:

- name: Setting up config
  uses: BlobDevelopment/copy-and-replace-tokens@v1
  with:
    source: 'config.yml.template'
    target: 'config.yml'
  env:
    MYSQL_HOST: mysql
    MYSQL_USER: ${{ secrets.MYSQL_USER }}
    MYSQL_PASSWORD: ${{ secrets.MYSQL_PASSWORD }}
    MYSQL_DATABASE: ${{ secrets.MYSQL_DATABASE }}

Example config.yml file:

mysql:
  host: {MYSQL_HOST}
  port: 3306
  username: {MYSQL_USER}
  password: {MYSQL_PASSWORD}
  database: {MYSQL_DATABASE}