Skip to content

I want to be able to pass all secret in the github environment to wrangler dynamically #383

@rudimocnik

Description

@rudimocnik

I have a monorepo with which I want to deploy all my various cloudflare workers. Each worker has a production and preview environment configured in github with environment-specific secrets (0..n). I am using the below step to provision secrets today. However, that doesn't work when I have more than 1 worker in the same repo running my unified github action to deploy the workers. Each worker will have different secrets so I need this to be dynamic. Is this supported by this github action? If not, any hints how to overcome this?

 - name: Deploy with Wrangler
        uses: cloudflare/wrangler-action@v3.14
        with:
          apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
          accountId: ${{ vars.CLOUDFLARE_ACCOUNT_ID }}
          workingDirectory: ${{ matrix.worker }}
          environment: ${{ steps.config.outputs.wrangler_env }}
          secrets: |
            DUMMY_SECRET_KEY
        env:
          DUMMY_SECRET_KEY: ${{ secrets.DUMMY_SECRET_KEY }}

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