Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dkershner6/vercel-set-env-action
A GitHub Action that ensures certain environment variables are set in Vercel
https://github.com/dkershner6/vercel-set-env-action
github-actions
Last synced: 29 days ago
JSON representation
A GitHub Action that ensures certain environment variables are set in Vercel
- Host: GitHub
- URL: https://github.com/dkershner6/vercel-set-env-action
- Owner: dkershner6
- License: apache-2.0
- Created: 2021-05-30T20:32:22.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-28T00:05:21.000Z (6 months ago)
- Last Synced: 2024-05-28T09:31:26.227Z (6 months ago)
- Topics: github-actions
- Language: TypeScript
- Homepage:
- Size: 529 KB
- Stars: 2
- Watchers: 3
- Forks: 6
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Vercel Set Env Action
This GitHub Action sets Environment Variables inside Vercel based on inputs.
## Usage
All keys in `envVariableKeys` must be matched by all 3: The key, and the key prefixed with `TARGET_` and `TYPE_`.
```yaml
jobs:
set-env-vars:
runs-on: ubuntu-latest
steps:
- name: Set Env Vars on Vercel Project
uses: dkershner6/vercel-set-env-action@v3
with:
token: ${{ secrets.VERCEL_API_TOKEN }}
teamId: ${{ secrets.VERCEL_TEAM_ID }} # optional, without will use personal
projectName: vercel-env-setter # project name in Vercel
envVariableKeys: ENV_VAR1,ENV_VAR2,ENV_VAR3
env:
ENV_VAR1: myEnvVar1
TARGET_ENV_VAR1: production # comma delimited, one of [production, preview, development]
TYPE_ENV_VAR1: encrypted # one of [plain, encrypted]
ENV_VAR2: envVar2Value
TARGET_ENV_VAR2: preview,development
TYPE_ENV_VAR2: plain
ENV_VAR3: envVar3Value
TARGET_ENV_VAR3: preview
TYPE_ENV_VAR3: plain
GIT_BRANCH_ENV_VAR3: feature/foo
```## Contributing
All contributions are welcome, please open an issue or pull request.
To use this repository:
1. `npm i -g pnpm` (if don't have pnpm installed)
2. `pnpm i`
3. `npx projen` (this will ensure everything is setup correctly, and you can run this command at any time)
4. Good to make your changes!
5. You can run `npx projen build` at any time to build the project.