nektos / act

Run your GitHub Actions locally 🚀
https://nektosact.com
MIT License
51.87k stars 1.3k forks source link

GitHub Event Context missing: github.event.repository.name #2370

Open katherine-circularise opened 1 week ago

katherine-circularise commented 1 week ago

Bug report info

not applicable

Command used with act

act <any workflow>

Describe issue

GitHub repository name is available via GITHUB_REPOSITORY env var, however I was using the event context (github.event.repository.name) as that already handles split by / for you. I've noticed that this is missing, which was leading to an empty string evaluation in my workflow.

If I have time, and manage to walk my way around the codebase, I'll send a PR adding this to the runner context. Creating the issue to keep track of htis.

Link to GitHub repository

No response

Workflow content

name: myWorkflow
on:
  push:
jobs:
  myJob:
    steps:
      - env:
          REPO_NAME: ${{ github.event.repository.name }}
        run: echo "Name: m${REPO_NAME}m"

Relevant log output

...
Name: mm
...

Additional information

No response

kittydoor commented 1 week ago

Whoops, that's the work account. Looping my personal account into the issue.