Files
frielith_discord_bot/.gitea/workflows/infisical-secrets.yml
aydent 32feacb375
Some checks failed
List Infisical Secrets / list-secrets (push) Failing after 13s
debug auth
2026-01-24 23:57:56 +01:00

47 lines
1.7 KiB
YAML

name: List Infisical Secrets
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
list-secrets:
runs-on: ubuntu-latest
steps:
- name: Force DNS resolution
run: |
# Install dnsutils to get the 'dig' command
sudo apt-get update && sudo apt-get install -y dnsutils
# Dynamically fetch the public IP to handle dynamic DNS
# We query Cloudflare DNS (1.1.1.1) to ignore local/Tailscale records
PUBLIC_IP=$(dig +short @1.1.1.1 infisical.lemarechal.eu | tail -n1)
echo "Public IP found: $PUBLIC_IP"
echo "$PUBLIC_IP infisical.lemarechal.eu" | sudo tee -a /etc/hosts
- name: Debug Authentication (curl)
env:
CLIENT_ID: ${{ secrets.INFISICAL_CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.INFISICAL_CLIENT_SECRET }}
run: |
echo "Testing authentication endpoint..."
curl -v -X POST https://infisical.lemarechal.eu/api/v1/auth/universal-auth/login \
-H "Content-Type: application/json" \
-d "{\"clientId\": \"$CLIENT_ID\", \"clientSecret\": \"$CLIENT_SECRET\"}"
- name: Fetch Secrets from Infisical
uses: https://github.com/Infisical/secrets-action@v1.0.7
with:
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: Display Secrets
run: |
echo "Secrets fetched and injected as environment variables."
env | grep -v "GITHUB_" | grep -v "GITEA_" | sort