Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken outputs from GSM actions #224

Open
wants to merge 38 commits into
base: main
Choose a base branch
from

Conversation

DerTiedemann
Copy link
Contributor

@DerTiedemann DerTiedemann commented Nov 26, 2024

Unbenannt
As you can see by the commit history - this was a ride which ultimately led me back to the toJSON workaround, in which usability suffers quite a bit. There has to be a better solution to this than just chaining actions together and glueing them togehter, but for now this is functional.

Here is an example workflow that works:

name: test

on:
  workflow_dispatch:

permissions:
  contents: read
  id-token: write

jobs:
  test-secret-fetch:
    name: load secrets
    runs-on: ubuntu-latest

    steps:
      - name: Load secrets
        id: load-secrets
        uses: bakdata/ci-templates/actions/gcp-gsm-load-secrets@tiedemann/gsm-object-outputs-fix
        with:
          gke-project-name: <redacted>
          workload-identity-provider: <redacted>
          gke-service-account: <redacted>
          secrets-to-inject: |-
             CRABBY_PATTY_FORMULA/1
      - name: test exported
        run: |
          echo "${{ fromJSON(steps.load-secrets.outputs.secret-json-string).CRABBY_PATTY_FORMULA }}" | rev

As you can see this is less then ideal but it works.
Just as a though, having 2 vanilla actions (gcp auth + gsm get secrets) might be a whole lot easier than rolling our own stuff. Maybe we just take the learnings and have sth simple.

@DerTiedemann DerTiedemann marked this pull request as ready for review November 27, 2024 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant