mirror of
https://github.com/nektos/act.git
synced 2026-04-26 09:25:54 +03:00
[GH-ISSUE #422] How to determine whether running workflows with act? #293
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#293
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @theowenyoung on GitHub (Nov 16, 2020).
Original GitHub issue: https://github.com/nektos/act/issues/422
Hi,
I can check if a workflow running in Github Actions by
${{ env.GITHUB_ACTIONS=='true'}}, but act also define envGITHUB_ACTIONS: true, so how to determine whether running workflows with act?There are some steps that I only want to run with Github, not locally.
Example:
How to define
ifcondition?@austinsasko commented on GitHub (Nov 16, 2020):
I think this is something that can have an env var for act specifically. e.g. in the runner context code I can add a line for
env["ACT_LOCAL"] = "true"and some other code where needed (e.g. dist index.js in repo)Then in the job you can specify
if: env.ACT_LOCAL=='true'and have that job only execute when running fromacton your local machineWould this provide you the functionality you are looking for?
@theowenyoung commented on GitHub (Nov 16, 2020):
@austinsasko yes, that totally solves my problem..
@torbjornvatn commented on GitHub (Nov 20, 2020):
This is actually solved in #417 which was merged to master yesterday.
It introduces an
ACT=trueenvironment variable@MattKiazyk commented on GitHub (Dec 4, 2020):
@torbjornvatn when can we expect a release that has #417 in it?
@github-actions[bot] commented on GitHub (Jan 16, 2021):
Issue is stale and will be closed in 14 days unless there is new activity