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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup.sh: Permission denied #245

Closed
baconcheese113 opened this issue Sep 9, 2023 · 2 comments
Closed

setup.sh: Permission denied #245

baconcheese113 opened this issue Sep 9, 2023 · 2 comments

Comments

@baconcheese113
Copy link

baconcheese113 commented Sep 9, 2023

I get the following Permission denied error when running this action locally on Windows 11 with nektos/act

[main/android]   馃惓  docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/2-composite-flutter-action.sh] user= workdir=
| /var/run/act/workflow/2-composite-flutter-action.sh: line 2: /var/run/act/actions/subosito-flutter-action@v2.10.0/setup.sh: Permission denied

I'm using this command to run

act -P macos-12=ghcr.io/catthehacker/ubuntu:runner-latest

And my docker container has the following file permissions for the subosito-flutter-action folder

$ cd /var/run/act/actions/subosito-flutter-action@v2.10.0
$ ls -al
total 40
drwxr-xr-x 5 runner runner 4096 Sep  9 20:11 .
drwxr-xr-x 4 root   root   4096 Sep  9 20:11 ..
drwxr-xr-x 4 runner runner 4096 Sep  9 20:11 .git
drwxr-xr-x 3 runner runner 4096 Sep  9 20:11 .github
-rw-rw-rw- 1 runner runner 1102 Sep  9 19:50 LICENSE
-rw-rw-rw- 1 runner runner 3947 Sep  9 20:11 README.md
-rw-rw-rw- 1 runner runner 2236 Sep  9 19:50 action.yml
-rw-rw-rw- 1 runner runner 5213 Sep  9 20:11 setup.sh
drwxr-xr-x 2 runner runner 4096 Sep  9 20:11 test

I tried chmoding the setup.sh file in the container directly, however it's reset each time the action is run

@maple135790
Copy link

new to act
i am using flutter and encountered the same issue
is there any workarounds exist?

@JaredHorwitz
Copy link

@baconcheese113 the following workaround worked for me:

  1. Fork this repository
  2. Add a step to the Github action chmod +x setup.sh

My action.yml looks like:

runs:
  using: 'composite'
  steps:
    - id: chmodx
      run: chmod +x $GITHUB_ACTION_PATH/setup.sh
      shell: bash
    - id: flutter-action
      run: $GITHUB_ACTION_PATH/setup.sh -p -c '${{ inputs.cache-path }}' -k '${{ inputs.cache-key }}' -n '${{ inputs.flutter-version }}' -a '${{ inputs.architecture }}' ${{ inputs.channel }}
      shell: bash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants