fix: change vault secrets to inputs
This commit is contained in:
parent
24a91cfb26
commit
532adeb826
1 changed files with 17 additions and 8 deletions
25
action.yml
25
action.yml
|
@ -1,8 +1,15 @@
|
||||||
---
|
---
|
||||||
name: 'Setup Java environment'
|
name: Setup Java environment
|
||||||
description: 'Initialise Java Environment and retrieve secrets from Vault'
|
description: Initialize Java Environment and retrieve secrets from Vault
|
||||||
|
inputs:
|
||||||
|
vault-role-id:
|
||||||
|
description: Role ID of Approle
|
||||||
|
required: true
|
||||||
|
vault-secret-id:
|
||||||
|
description: Secret ID of Approle
|
||||||
|
required: true
|
||||||
runs:
|
runs:
|
||||||
using: 'composite'
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
- name: Import Secrets
|
- name: Import Secrets
|
||||||
id: import-secrets
|
id: import-secrets
|
||||||
|
@ -11,8 +18,8 @@ runs:
|
||||||
url: https://vault.w9r.dev
|
url: https://vault.w9r.dev
|
||||||
method: approle
|
method: approle
|
||||||
role: forgejo-ci
|
role: forgejo-ci
|
||||||
roleId: "${{ secrets.VAULT_ROLE_ID }}"
|
roleId: ${{ inputs.vault-role-id }}
|
||||||
secretId: "${{ secrets.VAULT_SECRET_ID }}"
|
secretId: ${{ inputs.vault-secret-id }}
|
||||||
secrets: |
|
secrets: |
|
||||||
kv/data/ci/nexus username | NEXUS_USERNAME ;
|
kv/data/ci/nexus username | NEXUS_USERNAME ;
|
||||||
kv/data/ci/nexus password | NEXUS_PASSWORD ;
|
kv/data/ci/nexus password | NEXUS_PASSWORD ;
|
||||||
|
@ -29,6 +36,7 @@ runs:
|
||||||
kv/data/ci/sonarqube sonarHost | SONARQUBE_HOST ;
|
kv/data/ci/sonarqube sonarHost | SONARQUBE_HOST ;
|
||||||
|
|
||||||
- name: Set up Environment
|
- name: Set up Environment
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
apt update
|
apt update
|
||||||
apt install -y zip
|
apt install -y zip
|
||||||
|
@ -119,9 +127,9 @@ runs:
|
||||||
- name: Setup Java
|
- name: Setup Java
|
||||||
uses: https://github.com/actions/setup-java@v4
|
uses: https://github.com/actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin' # See 'Supported distributions' for available options
|
distribution: temurin # See 'Supported distributions' for available options
|
||||||
java-version: '21'
|
java-version: 21
|
||||||
cache: 'maven'
|
cache: maven
|
||||||
check-latest: true
|
check-latest: true
|
||||||
|
|
||||||
|
|
||||||
|
@ -135,6 +143,7 @@ runs:
|
||||||
git_commit_gpgsign: true
|
git_commit_gpgsign: true
|
||||||
|
|
||||||
- name: GPG user IDs
|
- name: GPG user IDs
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "fingerprint: ${{ steps.import-gpg.outputs.fingerprint }}"
|
echo "fingerprint: ${{ steps.import-gpg.outputs.fingerprint }}"
|
||||||
echo "keyid: ${{ steps.import-gpg.outputs.keyid }}"
|
echo "keyid: ${{ steps.import-gpg.outputs.keyid }}"
|
||||||
|
|
Loading…
Add table
Reference in a new issue