Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pulling remote actions with +x scripts fails with Permission denied on Windows #2625

Open
oliverrahner opened this issue Jan 20, 2025 · 0 comments
Labels
kind/bug Something isn't working

Comments

@oliverrahner
Copy link

Bug report info

act version:            0.2.71
GOOS:                   windows
GOARCH:                 amd64
NumCPU:                 24
Docker host:            DOCKER_HOST environment variable is not set
Sockets found:
        \\.\pipe\docker_engine(broken)
Config files:
        C:\Users\Oliver\AppData\Local\act\actrc:
                -P ubuntu-latest=catthehacker/ubuntu:act-latest
                -P ubuntu-22.04=catthehacker/ubuntu:act-22.04
                -P ubuntu-20.04=catthehacker/ubuntu:act-20.04
                -P ubuntu-18.04=catthehacker/ubuntu:act-18.04
Build info:
        Go version:            go1.23.4
        Module path:           github.com/nektos/act
        Main version:          (devel)
        Main path:             github.com/nektos/act
        Main checksum:
        Build settings:
                -buildmode:           exe
                -compiler:            gc
                -ldflags:             -s -w -X main.version=0.2.71 -X main.commit=0006dee285413b6f2a432f65a0947e5b1d8be2f7 -X main.date=2025-01-01T02:31:04Z -X main.builtBy=goreleaser
                CGO_ENABLED:          0
                GOARCH:               amd64
                GOOS:                 windows
                GOAMD64:              v1
                vcs:                  git
                vcs.revision:         0006dee285413b6f2a432f65a0947e5b1d8be2f7
                vcs.time:             2025-01-01T02:30:43Z
                vcs.modified:         false
Docker Engine:
        Engine version:        27.1.1
        Engine runtime:        runc
        Cgroup version:        1
        Cgroup driver:         cgroupfs
        Storage driver:        overlay2
        Registry URI:          https://index.docker.io/v1/
        OS:                    Docker Desktop
        OS type:               linux
        OS version:
        OS arch:               x86_64
        OS kernel:             5.15.167.4-microsoft-standard-WSL2
        OS CPU:                24
        OS memory:             31665 MB
        Security options:
                name=seccomp,profile=unconfined

Command used with act

act -v

Describe issue

My workflow uses the custom action rlespinasse/github-slug-action@v5.

When running the step, this happens:

[Build and Push Docker Image/build] [DEBUG] Writing entry to tarball workflow/2-composite-prefligth.sh len:34
[Build and Push Docker Image/build] [DEBUG] Extracting content to '/var/run/act'
[Build and Push Docker Image/build]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/2-composite-prefligth.sh] user= workdir=
[Build and Push Docker Image/build] [DEBUG] Exec command '[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/2-composite-prefligth.sh]'
[Build and Push Docker Image/build] [DEBUG] Working directory '/mnt/d/Coding/projectname'
| /var/run/act/workflow/2-composite-prefligth.sh: line 2: /var/run/act/actions/rlespinasse-github-slug-action@v5/preflight.sh: Permission denied
[Build and Push Docker Image/build]   ❌  Failure - Main $GITHUB_ACTION_PATH/preflight.sh
[Build and Push Docker Image/build] exitcode '126': failure

During troubleshooting, I recognized that, immediately after cloneing the action's repository, git diff from inside ~/.cache/act/rlespinasse-github-slug-action@v5 shows the following:

~/.cache/act/rlespinasse-github-slug-action@v5 $ git diff
diff --git a/preflight.sh b/preflight.sh
old mode 100755
new mode 100644

When following the trail, I found that this go-git issue describes what's going on, so it really seems to be an upstream issue.

The workflow below is the MRE, thus doesn't do anything useful.

Link to GitHub repository

private

Workflow content

name: Build and Push Docker Image

on:
  push:

jobs:
  build:
    runs-on: [ubuntu-latest]

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Slugify Github Variables
        uses: rlespinasse/github-slug-action@v5

Relevant log output

# -v doesn't provide useful output

[Build and Push Docker Image/build] ⭐ Run Main $GITHUB_ACTION_PATH/preflight.sh
[Build and Push Docker Image/build]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/1-composite-prefligth.sh] user= workdir=
| /var/run/act/workflow/1-composite-prefligth.sh: line 2: /var/run/act/actions/rlespinasse-github-slug-action@v5/preflight.sh: Permission denied
[Build and Push Docker Image/build]   ❌  Failure - Main $GITHUB_ACTION_PATH/preflight.sh
[Build and Push Docker Image/build] exitcode '126': failure
[Build and Push Docker Image/build]   ❌  Failure - Main Slugify Github Variables
[Build and Push Docker Image/build] exitcode '126': failure

Additional information

No response

@oliverrahner oliverrahner added the kind/bug Something isn't working label Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant