Skip to content

alsosee/envset

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

envset GitHub Action

main release

This action sets an environment variable in GitHub Actions workflow. It is useful when you want to set an environment variable that may contain double or single quotes, and you don't know the value in advance.

Action writes into a GITHUB_ENV file, so the environment variable will be available in the next steps of the same job. It's equivalent to echo "SOME_VARIABLE=$SOME_VALUE" >> $GITHUB_ENV, but less error-prone in case value contains quotes.

This is a Docker-based action, so it may not work on Windows and MacOS runners.

Inputs

Name Description Required
name Environment variable name true
value Environment variable value true

Usage

name: dispatch

on:
  workflow_dispatch:
    inputs:
      some_value:
        description: Some value
        required: true

dispatch:
  pull:
    runs-on: ubuntu-latest
    steps:
      - name: Set environment variable
        uses: alsosee/envset@v1
        with:
          name: SOME_VARIABLE
          value: ${{ github.event.inputs.some_value }}

      ...

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages