Skip to content

Instantly share code, notes, and snippets.

@hatemhosny
Created July 25, 2024 11:20
Show Gist options
  • Save hatemhosny/f9992487128123222a9200c34e367efc to your computer and use it in GitHub Desktop.
Save hatemhosny/f9992487128123222a9200c34e367efc to your computer and use it in GitHub Desktop.
save GitHub secrets and vars to artifact
name: ENV
on: [push]
jobs:
create-envfile:
runs-on: ubuntu-latest
steps:
- name: Make secrets envfile
uses: SpicyPizza/create-envfile@v2.0
with:
envkey_SECRETS: ${{ toJSON(secrets) }}
file_name: secrets.js
fail_on_empty: false
- name: Make vars envfile
uses: SpicyPizza/create-envfile@v2.0
with:
envkey_VARS: ${{ toJSON(vars) }}
file_name: vars.js
fail_on_empty: false
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: env_vars
path: .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment