Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/chingc/demo-github-actions-env-vars

A quickstart and reference for my future self.
https://github.com/chingc/demo-github-actions-env-vars

demo quickstart reference

Last synced: 3 days ago
JSON representation

A quickstart and reference for my future self.

Awesome Lists containing this project

README

        

# Demo

Environment variables and their scopes work as you'd expect in GitHub Actions.

They're also fairly self-contained, so any changes you make are isolated to the job you're in.

One thing that can cause confusion is the fact that environment variables defined within a step aren't accessible until the next step.

## Overview

- Read env vars
- Write env vars
- Pass env vars
- Modify PATH env var

## References

- [GitHub Docs: GitHub Actions](https://docs.github.com/en/actions)
- [GitHub Docs: Setting an environment variable](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#setting-an-environment-variable)
- [GitHub Docs: jobs..outputs](https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#jobsjob_idoutputs)
- [GitHub Docs: Adding a system path](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#adding-a-system-path)