Dynamically fetching the vaults secrets from 1Pass

  Kiến thức lập trình

How can I dynamically fetch the secrets from 1Password into Github action env variable?

Tried the following to dynamically fetch the item name which is not replacing the $col2 value

if the input param is “prod”, then the col2 should be replaced accordingly to fetch the password from prod. How to dynamically replace the item/section ?


 - name: Load secret
        uses: 1password/load-secrets-action@v2
        with:
          # Export loaded secrets as environment variables
          export-env: true
        env:
          OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
          DATABASE_PWD: "op://personal/$col2/password"
          DATABASE_USER: "op://personal/$col2/username" ```

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT