feat: replace manual Infisical CLI secret fetching with the official Infisical secrets action.
Some checks failed
List Infisical Secrets / list-secrets (push) Failing after 2m18s
Some checks failed
List Infisical Secrets / list-secrets (push) Failing after 2m18s
This commit is contained in:
@@ -9,21 +9,19 @@ jobs:
|
|||||||
list-secrets:
|
list-secrets:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Install Infisical CLI
|
- name: Fetch Secrets from Infisical
|
||||||
run: |
|
uses: https://github.com/Infisical/secrets-action@v1.0.7
|
||||||
curl -1sLf 'https://artifacts-cli.infisical.com/setup.deb.sh' | sudo -E bash
|
with:
|
||||||
sudo apt-get update && sudo apt-get install -y infisical
|
client-id: ${{ secrets.INFISICAL_CLIENT_ID }}
|
||||||
|
client-secret: ${{ secrets.INFISICAL_CLIENT_SECRET }}
|
||||||
|
project-id: ${{ secrets.INFISICAL_PROJECT_ID }}
|
||||||
|
env-slug: prod
|
||||||
|
secret-path: /Discord_bot
|
||||||
|
domain: https://infisical.lemarechal.eu
|
||||||
|
|
||||||
- name: List and Export Secrets
|
- name: Display Secrets
|
||||||
env:
|
|
||||||
INFISICAL_API_URL: https://infisical.lemarechal.eu
|
|
||||||
INFISICAL_UNIVERSAL_AUTH_CLIENT_ID: ${{ secrets.INFISICAL_CLIENT_ID }}
|
|
||||||
INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET: ${{ secrets.INFISICAL_CLIENT_SECRET }}
|
|
||||||
run: |
|
run: |
|
||||||
# Connexion explicite via Universal Auth
|
echo "Secrets fetched and injected as environment variables."
|
||||||
infisical login --method=universal-auth \
|
# Note: Gitea/GitHub will mask the values of these secrets in the logs.
|
||||||
--client-id=$INFISICAL_UNIVERSAL_AUTH_CLIENT_ID \
|
# To see which keys were fetched, we can list the environment variables.
|
||||||
--client-secret=$INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET
|
env | grep -v "GITHUB_" | grep -v "GITEA_" | sort
|
||||||
|
|
||||||
# Lister les secrets
|
|
||||||
infisical secrets --path /Discord_bot --env prod --projectId ${{ secrets.INFISICAL_PROJECT_ID }}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user