[GH-ISSUE #953] Each run command in the workflow create a new file in the workdir ? #564

Closed
opened 2026-03-01 21:44:32 +03:00 by kerem · 7 comments
Owner

Originally created by @lflorent on GitHub (Jan 6, 2022).
Original GitHub issue: https://github.com/nektos/act/issues/953

Hi,

When I launch a job with act, the process creates a workflow folder in the repo root folder (workdir).
For each run bash command (no matter the command) a file is created with this pattern ./workflow/<step_number - 1> (e.g. ./workflow/3 for step 4).

This files are then used by act to launch a docker command who display a act log output like :

docker exec cmd=[bash --noprofile --norc -e -o pipefail /Users/<local_user>/sites/<local_repo_folder>/workflow/1] user= workdir=`

For example, with :

- name: Success Message
   run: echo "Deploy Done."

This will generate ./workflow/3 file :

$ cat ./workflow/3
echo "Deploy Done."

I'm wondering if this mechanism (create new folder/files in local repo folder) is normal or maybe I misconfigured or misused something ?

Is it only an act mechanism ? GitHub Actions does the same ?

I run some bash command (via run: configs) before sync the repo root folder with a remote host for deploy and I would have liked to know if I will always have to exclude this autogenerated workflow folder.

Thanks in advance for your precious help.

System information

- Operating System: macOS
- Architecture: arm64
- Apple M1: yes
- Docker version: 20.10.11
- Docker image used in `act`: ghcr.io/catthehacker/ubuntu:act-latest
- `act` version: 0.2.25
Originally created by @lflorent on GitHub (Jan 6, 2022). Original GitHub issue: https://github.com/nektos/act/issues/953 Hi, When I launch a job with `act`, the process creates a `workflow` folder in the repo root folder (workdir). For each run bash command (no matter the command) a file is created with this pattern `./workflow/<step_number - 1>` (e.g. `./workflow/3` for step 4). This files are then used by `act` to launch a docker command who display a `act` log output like : ```bash docker exec cmd=[bash --noprofile --norc -e -o pipefail /Users/<local_user>/sites/<local_repo_folder>/workflow/1] user= workdir=` ``` For example, with : ```yaml - name: Success Message run: echo "Deploy Done." ``` This will generate ./workflow/3 file : ``` $ cat ./workflow/3 echo "Deploy Done." ``` I'm wondering if this mechanism (create new folder/files in local repo folder) is normal or maybe I misconfigured or misused something ? Is it only an `act` mechanism ? GitHub Actions does the same ? I run some bash command (via `run:` configs) before sync the repo root folder with a remote host for deploy and I would have liked to know if I will always have to exclude this autogenerated `workflow` folder. Thanks in advance for your precious help. ## System information - Operating System: macOS - Architecture: arm64 - Apple M1: yes - Docker version: 20.10.11 - Docker image used in `act`: ghcr.io/catthehacker/ubuntu:act-latest - `act` version: 0.2.25
kerem 2026-03-01 21:44:32 +03:00
Author
Owner

@catthehacker commented on GitHub (Jan 6, 2022):

Is it only an act mechanism ?

Yes

I run some bash command (via run: configs) before sync the repo root folder with a remote host for deploy and I would have liked to know if I will always have to exclude this autogenerated workflow folder.

No, it has been fixed in github.com/nektos/act@adabf2a202
(it will be part of next version release)

<!-- gh-comment-id:1006652413 --> @catthehacker commented on GitHub (Jan 6, 2022): > Is it only an `act` mechanism ? Yes > I run some bash command (via `run:` configs) before sync the repo root folder with a remote host for deploy and I would have liked to know if I will always have to exclude this autogenerated `workflow` folder. No, it has been fixed in https://github.com/nektos/act/commit/adabf2a2027fa9da3410febc474d55327e2abeb7 (it will be part of next version release)
Author
Owner

@lflorent commented on GitHub (Jan 6, 2022):

Hi @catthehacker,

Thanks for your quick answer and your fix.

I looked the existing issues but didn't find similar issue ...

I'll test again with the next release.

<!-- gh-comment-id:1006661871 --> @lflorent commented on GitHub (Jan 6, 2022): Hi @catthehacker, Thanks for your quick answer and your fix. I looked the existing issues but didn't find similar issue ... I'll test again with the next release.
Author
Owner

@catthehacker commented on GitHub (Jan 6, 2022):

I looked the existing issues but didn't find similar issue ...

I think no one reported it before and I noticed it quite late
If you don't want to wait for next release, there are artefacts for each PR (latest merged PR: https://github.com/nektos/act/actions/runs/1633555344)

<!-- gh-comment-id:1006729055 --> @catthehacker commented on GitHub (Jan 6, 2022): > I looked the existing issues but didn't find similar issue ... I think no one reported it before and I noticed it quite late If you don't want to wait for next release, there are artefacts for each PR (latest merged PR: https://github.com/nektos/act/actions/runs/1633555344)
Author
Owner

@lflorent commented on GitHub (Jan 7, 2022):

I've tested the arm64 artefact release of your provided PR.

The good news is that there is no more workflow folder that appears in the workdir.

But for me there is a regression with if: ${{ !env.ACT }} expressions.

The env ACT variable still here in the step context :

ENV ==> [GITHUB_SHA=*** GITHUB_RUN_NUMBER=1 ImageOS=ubuntu20 LSB_OS_VERSION=2004 .. ACT=true ...]

But all steps run no matter if: ${{ !env.ACT }}.

<!-- gh-comment-id:1007261147 --> @lflorent commented on GitHub (Jan 7, 2022): I've tested the arm64 artefact release of your provided PR. The good news is that there is no more workflow folder that appears in the workdir. But for me there is a regression with `if: ${{ !env.ACT }}` expressions. The env ACT variable still here in the step context : ```bash ENV ==> [GITHUB_SHA=*** GITHUB_RUN_NUMBER=1 ImageOS=ubuntu20 LSB_OS_VERSION=2004 .. ACT=true ...] ``` But all steps run no matter `if: ${{ !env.ACT }}`.
Author
Owner

@catthehacker commented on GitHub (Jan 7, 2022):

This is https://github.com/nektos/act/issues/940

<!-- gh-comment-id:1007297720 --> @catthehacker commented on GitHub (Jan 7, 2022): This is https://github.com/nektos/act/issues/940
Author
Owner

@github-actions[bot] commented on GitHub (Feb 7, 2022):

Issue is stale and will be closed in 14 days unless there is new activity

<!-- gh-comment-id:1030946856 --> @github-actions[bot] commented on GitHub (Feb 7, 2022): Issue is stale and will be closed in 14 days unless there is new activity
Author
Owner

@catthehacker commented on GitHub (Feb 21, 2022):

Fixed by https://github.com/nektos/act/pull/930

<!-- gh-comment-id:1046652363 --> @catthehacker commented on GitHub (Feb 21, 2022): Fixed by https://github.com/nektos/act/pull/930
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#564
No description provided.