Skip to content

Commit

Permalink
new: github/set-environment-for-all-steps.md
Browse files Browse the repository at this point in the history
  • Loading branch information
byt3h3ad committed Dec 28, 2023
1 parent eb68741 commit 421dadb
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions github/set-environment-for-all-steps.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Set environment variables for all steps in a GitHub Action

From [this example](https://github.com/GoogleCloudPlatform/github-actions/blob/20c294aabd5331f9f7b8a26e6075d41c31ce5e0d/example-workflows/cloud-run/.github/workflows/cloud-run.yml) I learned that you can set environment variables such that they will be available in ALL jobs once at the top of a workflow:

```yaml
name: Build and Deploy to Cloud Run

on:
push:
branches:
- master

env:
PROJECT_ID: ${{ secrets.RUN_PROJECT }}
RUN_REGION: us-central1
SERVICE_NAME: helloworld-nodejs
```

0 comments on commit 421dadb

Please sign in to comment.