Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

Doesn't work for secrets that have equals in them #1

Description

@jacobpretorius

It seems like there is an error with replacing anything that contains an "=" character.

For example I have an Action setup with the following

runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v2

      - uses: LSVH/gha-replace-placeholders@v1
        with:
          include: |
            ./src/settings.ts
          placeholders: |
            process.env.AZURE_AI_TOKEN='${{ secrets.AZURE_AI_TOKEN }}'

And my settings.ts has something like:

APPLICATION_INSIGHTS: {
    ENABLED: true,
    KEY:
      process.env.AZURE_AI_TOKEN || 'local test value',
  }

If you match this setup you will see that any secret, such as for example test=value placed in a matching Github secret such as my secrets.AZURE_AI_TOKEN causes the replacement logic to go off the rails a bit and the resulting file is not replaced correctly.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions