2024-02-13 23:37:58 -07:00
|
|
|
# Based on https://github.com/zerodays/action-infisical/blob/master/action.yml
|
|
|
|
name: 'Elysium Infisical Secrets'
|
|
|
|
description: 'Fetch secrets from Infisical and add them to the env'
|
|
|
|
inputs:
|
|
|
|
infisical-token:
|
|
|
|
description: 'Infisical API Token'
|
|
|
|
required: true
|
|
|
|
environment:
|
|
|
|
description: 'The environment to fetch secrets for (e.g., staging, production)'
|
|
|
|
required: true
|
|
|
|
secret-path:
|
|
|
|
description: 'Secret path (defaults to /)'
|
2024-02-14 19:50:41 -07:00
|
|
|
required: true
|
2024-02-13 23:37:58 -07:00
|
|
|
api-url:
|
2024-02-14 19:50:41 -07:00
|
|
|
description: 'Infisical API URL (defaults to https://infisical.dunemask.dev/api)'
|
2024-02-13 23:37:58 -07:00
|
|
|
required: false
|
2024-02-14 19:50:41 -07:00
|
|
|
default: 'https://infisical.dunemask.dev/api'
|
2024-02-13 23:37:58 -07:00
|
|
|
runs:
|
|
|
|
using: 'composite'
|
|
|
|
steps:
|
2024-02-14 16:44:28 -07:00
|
|
|
- name: Infisical CLI install
|
|
|
|
shell: bash
|
|
|
|
run: |
|
2024-02-14 16:47:02 -07:00
|
|
|
curl -s -L https://github.com/Infisical/infisical/releases/download/infisical-cli%2Fv0.16.10/infisical_0.16.10_linux_amd64.tar.gz | tar xvz
|
2024-02-14 19:50:41 -07:00
|
|
|
./infisical export --domain ${{ inputs.api-url }} --token ${{ inputs.infisical-token}} --env ${{ inputs.environment }} --path ${{ inputs.secret-path }} > $GITHUB_ENV
|
2024-02-13 23:37:58 -07:00
|
|
|
- shell: bash
|
|
|
|
run: echo "Secrets added to environment!".
|