Skip to content

GITHUB_ENV does not update when running composite actions multiple times #789

@GabrielBottari

Description

@GabrielBottari

Describe the bug
I've separated repeating shell logic to its own composite action. On each run, I'm setting a label into GITHUB_ENV to re-use it down the line. It works the first time, but subsequent calls to the composite action can't seem to update that value, as mentioned in the docs. After trying to set it, it just keeps the old value.

To Reproduce
Steps to reproduce the behavior:

  1. Setup a composite action
  2. Add step run: echo "label=${{ inputs.label }}-$GITHUB_SHA" >> $GITHUB_ENV
  3. Call this action multiple times in your job with different labels

Expected behavior
The environment variable should be updated properly on every call.

Runner Version and Platform

Version of your runner? Where do I see that?

OS of the machine running the runner? ubuntu-latest

What's not working?

There is no output whatsoever

Metadata

Metadata

Assignees

No one assigned

    Labels

    Runner BugBug fix scope to the runnerbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions