Skip to content

Latest commit

 

History

History
30 lines (22 loc) · 674 Bytes

README.md

File metadata and controls

30 lines (22 loc) · 674 Bytes

import-secrets

Action to export all secrets in "Environment secrets" to environment variables inside actions in all steps in job.


Example

name: Build

on:
  push:
    branches: [ main ]

jobs:
  deploy:
    runs-on: ubuntu-latest
    environment: production
    steps:
      - name: Import secrets
        uses: Pablommr/[email protected]
        env:
          ALL_SECRETS: ${{ toJson(secrets) }}

Usage

To use this action, you just need set an environment and an env 'ALL_SECRETS' with the value '${{ toJson(secrets) }}'. So then, the secrets will be availible in environment variables inside your action in all steps inside the job =).