Compare commits
No commits in common. "main" and "v0.1.0" have entirely different histories.
2 changed files with 17 additions and 13 deletions
|
|
@ -10,7 +10,6 @@
|
||||||
| vault_password | Your Secrets Manager Password, a random generated password provided by the STACKIT Portal | - |
|
| vault_password | Your Secrets Manager Password, a random generated password provided by the STACKIT Portal | - |
|
||||||
| vault_path | The Path to your Secret can be some like this: "test" or "folder/test" | - |
|
| vault_path | The Path to your Secret can be some like this: "test" or "folder/test" | - |
|
||||||
| debug | true or false, enable or disable Debug Logging | false |
|
| debug | true or false, enable or disable Debug Logging | false |
|
||||||
| version | version of action, default says v0 but it should be the same as in the git ref. See [releases](https://stackit-solutions.git.onstackit.cloud/actions/secretsmanager/releases). | v0 |
|
|
||||||
|
|
||||||
## usage
|
## usage
|
||||||
|
|
||||||
|
|
@ -37,7 +36,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Fetch secrets from STACKIT Secrets Manager
|
- name: Fetch secrets from STACKIT Secrets Manager
|
||||||
id: secrets
|
id: secrets
|
||||||
uses: https://stackit-solutions.git.onstackit.cloud/actions/secretsmanager@v0
|
uses: https://stackit-solutions.git.onstackit.cloud/actions/secretsmanager@main
|
||||||
with:
|
with:
|
||||||
# vault_addr: 'https://prod.sm.eu01.stackit.cloud' # Optional - uses default STACKIT endpoint
|
# vault_addr: 'https://prod.sm.eu01.stackit.cloud' # Optional - uses default STACKIT endpoint
|
||||||
vault_id: ${{ secrets.VAULT_ID }} # Your Secrets Manager ID
|
vault_id: ${{ secrets.VAULT_ID }} # Your Secrets Manager ID
|
||||||
|
|
@ -45,7 +44,6 @@ jobs:
|
||||||
vault_password: ${{ secrets.VAULT_PASSWORD }} # Your STACKIT Secrets Manager password
|
vault_password: ${{ secrets.VAULT_PASSWORD }} # Your STACKIT Secrets Manager password
|
||||||
vault_path: ${{ secrets.VAULT_PATH }} # The secret key/path in your Secrets Manager
|
vault_path: ${{ secrets.VAULT_PATH }} # The secret key/path in your Secrets Manager
|
||||||
debug: false # Set to 'true' for debug logging
|
debug: false # Set to 'true' for debug logging
|
||||||
version: v0 # Optional - here you can override the binary download version
|
|
||||||
|
|
||||||
- name: Output secret
|
- name: Output secret
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
26
action.yml
26
action.yml
|
|
@ -24,10 +24,6 @@ inputs:
|
||||||
description: Turn on debugging logs.
|
description: Turn on debugging logs.
|
||||||
required: false
|
required: false
|
||||||
default: false
|
default: false
|
||||||
version:
|
|
||||||
description: The version of the action.
|
|
||||||
required: false
|
|
||||||
default: 'v0'
|
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
secrets:
|
secrets:
|
||||||
|
|
@ -36,12 +32,23 @@ outputs:
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
- name: Run SecretsManager Action
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: ${{ inputs.go_version }}
|
||||||
|
|
||||||
|
- name: Check out action code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: actions/secretsmanager
|
||||||
|
ref: main
|
||||||
|
github-server-url: https://stackit-solutions.git.onstackit.cloud
|
||||||
|
|
||||||
|
- name: Run Vault Fetcher and set output
|
||||||
id: secrets
|
id: secrets
|
||||||
run: |
|
run: |
|
||||||
wget ${{ env.ACTION_URL }}/releases/download/${{ inputs.version }}/action-secretsmanager
|
go mod tidy
|
||||||
chmod +x action-secretsmanager
|
go run main.go >> $GITHUB_OUTPUT
|
||||||
./action-secretsmanager >> $GITHUB_OUTPUT
|
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
VAULT_ADDR: ${{ inputs.vault_addr }}
|
VAULT_ADDR: ${{ inputs.vault_addr }}
|
||||||
|
|
@ -49,5 +56,4 @@ runs:
|
||||||
VAULT_USERNAME: ${{ inputs.vault_username }}
|
VAULT_USERNAME: ${{ inputs.vault_username }}
|
||||||
VAULT_PASSWORD: ${{ inputs.vault_password }}
|
VAULT_PASSWORD: ${{ inputs.vault_password }}
|
||||||
VAULT_PATH: ${{ inputs.vault_path }}
|
VAULT_PATH: ${{ inputs.vault_path }}
|
||||||
DEBUG: ${{ inputs.debug }}
|
DEBUG: ${{ inputs.debug }}
|
||||||
ACTION_URL: https://stackit-solutions.git.onstackit.cloud/actions/secretsmanager
|
|
||||||
Loading…
Reference in a new issue