Wrong working directory in gitea actions #11285

Closed
opened 2025-11-02 09:33:23 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @why0why0why on GitHub (Jul 20, 2023).

Description

I run wsl2, docker desktop, act_runner 0.2.3 and gitea 1.20.0 on windows.
When I try to run actions/checkout, the working directory shows as /mnt/d/C:/Users/xxxxx/.cache/act/xxxx/CICDtest, and it seems wrong.

There is my yaml file:

name: Gitea Actions
run-name: test
on:
  push:
    branches:
      - main
  merge:
    branches:
      - main
jobs:
  test:
    runs-on: ubuntu-ostl
    steps:
      - name: Check out with submodules
        uses: https://gitea.com/actions/checkout@v3
        with:
          token: "${{ secrets.PAT_SUBMODULES }}"
          submodules: recursive
      - name: build
        run: |
          chmod 777 ./build_sh/build.sh
          ./build_sh/build.sh stm32mp157a-dtu-core
      - name: release
        run: |
          cd FIP_artifacts
          ls
          cd fip
          ls
          cd ../arm-trusted-firmware
          ls

The ubuntu-ostl label is a container made by this:

FROM node:16-bullseye
ADD 4.0.4-openstlinux-5.15-yocto-kirkstone-mp1-v22.11.23.tar.gz /opt/st/stm32mp1/

The actions log:

::save-state name=isPost::true
::add-matcher::/run/act/actions/https---gitea.com-actions-checkout@v3/dist/problem-matcher.json
Syncing repository: xxxxx/CICDtest
::group::Getting Git version info
Working directory is '/mnt/d/C:/Users/xxxxx/.cache/act/xxxxx/CICDtest'
[command]/usr/bin/git version
git version 2.30.2
::endgroup::

The actions log of gitea 1.19.4:

::save-state name=isPost::true
::add-matcher::/run/act/actions/actions-checkout@v3/dist/problem-matcher.json
Syncing repository: xxxxxx/CICDtest
::group::Getting Git version info
Working directory is '/mnt/d/workspace/xxxxxx/CICDtest'
[command]/usr/bin/git version
git version 2.30.2
::endgroup::

Gitea Version

1.20.0

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Windows 10

How are you running Gitea?

Download from github release

Database

SQLite

Originally created by @why0why0why on GitHub (Jul 20, 2023). ### Description I run wsl2, docker desktop, act_runner 0.2.3 and gitea 1.20.0 on windows. When I try to run actions/checkout, the working directory shows as /mnt/d/C:/Users/xxxxx/.cache/act/xxxx/CICDtest, and it seems wrong. There is my yaml file\: ```yaml name: Gitea Actions run-name: test on: push: branches: - main merge: branches: - main jobs: test: runs-on: ubuntu-ostl steps: - name: Check out with submodules uses: https://gitea.com/actions/checkout@v3 with: token: "${{ secrets.PAT_SUBMODULES }}" submodules: recursive - name: build run: | chmod 777 ./build_sh/build.sh ./build_sh/build.sh stm32mp157a-dtu-core - name: release run: | cd FIP_artifacts ls cd fip ls cd ../arm-trusted-firmware ls ``` The ubuntu-ostl label is a container made by this: ```Dockerfile FROM node:16-bullseye ADD 4.0.4-openstlinux-5.15-yocto-kirkstone-mp1-v22.11.23.tar.gz /opt/st/stm32mp1/ ``` The actions log\: ``` ::save-state name=isPost::true ::add-matcher::/run/act/actions/https---gitea.com-actions-checkout@v3/dist/problem-matcher.json Syncing repository: xxxxx/CICDtest ::group::Getting Git version info Working directory is '/mnt/d/C:/Users/xxxxx/.cache/act/xxxxx/CICDtest' [command]/usr/bin/git version git version 2.30.2 ::endgroup:: ``` The actions log of gitea 1.19.4\: ``` ::save-state name=isPost::true ::add-matcher::/run/act/actions/actions-checkout@v3/dist/problem-matcher.json Syncing repository: xxxxxx/CICDtest ::group::Getting Git version info Working directory is '/mnt/d/workspace/xxxxxx/CICDtest' [command]/usr/bin/git version git version 2.30.2 ::endgroup:: ``` ### Gitea Version 1.20.0 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System Windows 10 ### How are you running Gitea? Download from github release ### Database SQLite
GiteaMirror added the topic/gitea-actionstype/bug labels 2025-11-02 09:33:23 -06:00
Author
Owner

@he0119 commented on GitHub (Aug 22, 2023):

After I upgrade act_runner to version 0.2.5, It works for me.

act_runner 0.2.3 with gitea 1.20.3

::add-matcher::/run/act/actions/actions-checkout@v3/dist/problem-matcher.json
Syncing repository: he0119/tailscale-acls
::group::Getting Git version info
Working directory is '/root/.cache/act/he0119/tailscale-acls'

act_runner 0.2.5 with gitea 1.20.3

::add-matcher::/run/act/actions/actions-checkout@v3/dist/problem-matcher.json
Syncing repository: he0119/tailscale-acls
::group::Getting Git version info
Working directory is '/workspace/he0119/tailscale-acls'
@he0119 commented on GitHub (Aug 22, 2023): After I upgrade act_runner to version 0.2.5, It works for me. act_runner 0.2.3 with gitea 1.20.3 ```log ::add-matcher::/run/act/actions/actions-checkout@v3/dist/problem-matcher.json Syncing repository: he0119/tailscale-acls ::group::Getting Git version info Working directory is '/root/.cache/act/he0119/tailscale-acls' ``` act_runner 0.2.5 with gitea 1.20.3 ```log ::add-matcher::/run/act/actions/actions-checkout@v3/dist/problem-matcher.json Syncing repository: he0119/tailscale-acls ::group::Getting Git version info Working directory is '/workspace/he0119/tailscale-acls' ```
Author
Owner

@why0why0why commented on GitHub (Aug 22, 2023):

@he0119 It seems that your platform is linux but mine is windows.
However, I just try again after upgrade act_runner to 0.2.5 and gitea to 1.20.3. It works now.
Thanks a lot.

Maybe this bug has been fixed by act_runner#279.

@why0why0why commented on GitHub (Aug 22, 2023): @he0119 It seems that your platform is linux but mine is windows. However, I just try again after upgrade act_runner to 0.2.5 and gitea to 1.20.3. It works now. Thanks a lot. Maybe this bug has been fixed by [act_runner#279](https://gitea.com/gitea/act_runner/pulls/279).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#11285