Runner: Context variable GITHUB_ACTION empty

Created on 4 Aug 2020  路  5Comments  路  Source: actions/runner

Describe the bug
Today our self-hosted runners updated automatically from version 2.267.1 to 2.272.0 (that version is shown as pre-relase currently, I think this is related with https://github.com/actions/runner/issues/581). We have tried to rollback the update but once the service runs it automatically updates again to the newest version (not latest):

curl -XGET https://api.github.com/repos/actions/runner/releases/latest
{
  "url": "https://api.github.com/repos/actions/runner/releases/28095660",
  "assets_url": "https://api.github.com/repos/actions/runner/releases/28095660/assets",
  "upload_url": "https://uploads.github.com/repos/actions/runner/releases/28095660/assets{?name,label}",
  "html_url": "https://github.com/actions/runner/releases/tag/v2.267.1",
  "id": 28095660,
  "node_id": "MDc6UmVsZWFzZTI4MDk1NjYw",
  "tag_name": "v2.267.1",
  "target_commitish": "fd3c9de49d3894943c54c08c92eba9f4e2b43f79",
  "name": "v2.267.1",
  "draft": false,
  "author": {
    "login": "github-actions[bot]",
    "id": 41898282,
    "node_id": "MDM6Qm90NDE4OTgyODI=",
    "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4",
    "gravatar_id": "",
    "url": "https://api.github.com/users/github-actions%5Bbot%5D",
    "html_url": "https://github.com/apps/github-actions",
    "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers",
    "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}",
    "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions",
    "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs",
    "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos",
    "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}",
    "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events",
    "type": "Bot",
    "site_admin": false
  },
  "prerelease": false,
  "created_at": "2020-07-01T02:19:24Z",
  "published_at": "2020-07-01T02:24:38Z",

After the upgrade the context variable GITHUB_ACTION is always empty: (https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#github-context).

We are using on our workflows a GitHub Action that uses this variable and it's failing as it is empty. The Action used is (AWS verified creator on Marketplace): https://github.com/aws-actions/configure-aws-credentials

On the action code they use the variable for TagSession and they check that exist: https://github.com/aws-actions/configure-aws-credentials/blob/master/index.js#L32

So our pipelines are failing because that variable has no value, before the update everything was working fine.

To Reproduce
Steps to reproduce the behavior:

  1. run any workflow and print ENV vars, GITHUB_ACTION is always empty. We have tested with this two options and we get the same output:
- name: Dump GitHub context
        env:
          GITHUB_CONTEXT: ${{ toJson(github) }}
        run: echo "$GITHUB_CONTEXT"
- name: echo env
        run: |
                echo "ENV vars"
                env

The result for that variable always is:
_"action": "",_
_GITHUB_ACTION=_

Expected behavior
The variable GITHUB_ACTION have some value, for example "GITHUB_ACTION=run"

Runner Version and Platform

Runner version: v2.272.0

OS of the machine running the runner? Linux (Amazon Linux 2 AMI 2.0.20200617.0 x86_64 HVM ebs)

What's not working?

when running the workflow and use the the action mentioned before we see the error "##[error]Missing required environment value. Are you running in GitHub Actions?" Checked all the vars that are using on the action and the only one without value after the update is GITHUB_ACTION.

Job Log Output

If applicable, include the relevant part of the job / step log output here. All sensitive information should already be masked out, but please double-check before pasting here.

Runner and Worker's Diagnostic Logs

attached "Runner_extract.log", extract from the update process done by the runner.
Runner_extract.log

bug

Most helpful comment

We're seeing a very similar issue using Github-hosted runners - the missing environment variable breaks any action that explicitly depend on it, and it is not possible to manually define a GITHUB_ACTION environment variable, per the docs

All 5 comments

We're seeing a very similar issue using Github-hosted runners - the missing environment variable breaks any action that explicitly depend on it, and it is not possible to manually define a GITHUB_ACTION environment variable, per the docs

seems breaking change has been rolled back. everything is working again

https://github.community/t/github-action-environment-variable-missing-breaking-issue/125913

For me it still fails.

I still saw the problem occurring 12 minutes ago

This seems to have broken for me again. Was the broken code rolled out again without a proper fix?

Was this page helpful?
0 / 5 - 0 ratings