williamsandonz
williamsandonz

Reputation: 16430

How to override an environment variable in Github Actions?

Given I have the following:

name: MyWorkFlow

on: push

env:
  FOO: bar1
jobs:
  myJob:
    - run: export FOO=bar2
    - run: echo $FOO

The output is 'bar1'. Is there anyway that I can override these environment variables?

Upvotes: 8

Views: 8445

Answers (1)

williamsandonz
williamsandonz

Reputation: 16430

run: echo "FOO=1234" >> $GITHUB_ENV

Upvotes: 12

Related Questions