Comments (6)
having a shebang line #!/bin/bash
doesnt make it executable. You need to probably need to chmod +x
that script to be safe or check permissions.
There's not much I can do here, I'm not sure how to troubleshoot a third party repo but this one seems to work with all the other workflows thrown at it.
from docker-github-actions-runner.
Hi @myoung34 ,
I have a script and it's executable:
-rwxr-xr-x 1 root root 697 Nov 11 10:03 verify-codegen.sh
The job is
codegen:
name: codegen
runs-on: self-hosted
steps:
- name: checkout code
uses: actions/checkout@v2
- name: install Go
uses: actions/setup-go@v2
with:
go-version: 1.14.x
- name: verify codegen
run: hack/verify-codegen.sh
The same job runs all well before, but after I switched to selfhost-runner, it always has Permission
issue:
/tmp/github-runner-your-repo/_temp/596a7601-8880-4e26-a527-96d9ba0f3a8c.sh: line 1: hack/verify-codegen.sh: Permission denied
PS: I'm running with deployment.
from docker-github-actions-runner.
@RainbowMango @Jollerprutt The reason I can't help you is because as a base: there's nothing preventing this from workign as far as this project is concerned.
To prove that this works as expected:
$ docker run \
-e REPO_URL="https://github.com/OctoKode/test1" \
-e RUNNER_NAME="foo-runner" \
-e RUNNER_TOKEN="redact" \
-v /var/run/docker.sock:/var/run/docker.sock \
myoung34/github-runner:latest
And committed this test push: OctoKode/test1@ce44c44
Its essentially the same as your verify codegen as far as executing is concerned:
name: Test
on: [push]
jobs:
test:
runs-on: self-hosted
steps:
- uses: actions/checkout@v1
- name: ls
run: ls -alh; pwd
- name: verify codegen
run: ./test.sh
where test.sh is +x and
#!/bin/bash
echo something
which gives me:
√ Connected to GitHub
2021-03-21 20:54:32Z: Running job: test
2021-03-21 20:54:37Z: Job test completed with result: Succeeded
From the runner
The output is here: https://github.com/OctoKode/test1/runs/2161381995?check_suite_focus=true
There's absolutely nothing keeping .sh files from executing. Youll need to dig into what permissions, location, etc is syncing and possibly preventing the execution, but again: nothing here is preventing these scripts from working.
from docker-github-actions-runner.
@myoung34 Thanks. I added bash
before each script and that works.
- name: verify codegen
run: bash hack/verify-codegen.sh
I don't know why.
from docker-github-actions-runner.
my guess is that whatever FS driver youre using is losing the +x
if you do a ls -alh
i bet it will coincide
from docker-github-actions-runner.
This is because docker mounts tmpfs
with noexec
flag. More info here
Edit: That I said above is relevant for --mount type=tmpfs
. Apparently you can use --tmpfs with exec
flag as workaround
e.g.
docker run -d --name github-runner9 \
-e REPO_URL="https://github.com/Jollerprutt/ci_test" \
-e RUNNER_NAME_PREFIX="arm-runner" \
-e ACCESS_TOKEN="<redacted>" \
-e RUNNER_WORKDIR="/tmp/github-runner-your-repo2" \
-e RUNNER_GROUP="my-group" \
-e LABELS="linux,arm64,cluster1,safe" \
-v /var/run/docker.sock:/var/run/docker.sock \
--tmpfs /tmp/github-runner-your-repo2:exec \
--security-opt=label=disable \
myoung34/github-runner:latest
from docker-github-actions-runner.
Related Issues (20)
- Latest bionic is broken with Glibc error HOT 2
- Use modern socket in Kubernetes YAML sample HOT 1
- Cannot Checkout Code When Running jobs Inside Container HOT 3
- Extremely slow? HOT 4
- Runner Name use ECS Task id/Container id HOT 1
- Q: "Full" runner images HOT 2
- Runner not showing up in Github but no errors HOT 3
- about the usage of docker-in-docker with github actions HOT 1
- [Clarification] JWT Authorization vs Github CLI HOT 2
- Missing `pkg-config` HOT 4
- Provide Ubuntu 22.04 Based Images HOT 10
- Customisation script and files in `/home/runner` HOT 2
- debian-sid missing libcurl3-gnutls
- Not able to run GH action in container (aarch64/arm64) HOT 1
- Powershell support HOT 3
- Runners are not deregistered HOT 3
- Docker Ulimit Invalid Argument.
- Please implement graceful shutdown of runners
- Debian 12 `bookworm` runner HOT 4
- turn off cute output HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-github-actions-runner.