How to override an environment variable in Github Actions?

Viewed 1734

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?

1 Answers
run: echo "FOO=1234" >> $GITHUB_ENV
Related