Skip to content

Commit

Permalink
feat(doc): fluidattacks#1328 update github actions example
Browse files Browse the repository at this point in the history
- Update the GitHub Actions example in the Getting
Started guide to show the use of
`chown -R root:root /github/workspace`
  • Loading branch information
rohaquinlop committed May 22, 2024
1 parent 1afab69 commit 11de445
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
- uses: docker://docker.io/nixos/nix@sha256:c3db4c484f6b1ee6c9bb8ca90307cfbeca8ef88156840911356a677eeaff4845
name: /dev/example
with:
args: sh -c "chown -R root:root /github/workspace && nix-env -if . && m . /dev/example"
args: m . /dev/example
macos_dev_example:
runs-on: macos-latest
steps:
Expand Down
10 changes: 9 additions & 1 deletion docs/src/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,17 @@ Example:
- uses: docker://ghcr.io/fluidattacks/makes/amd64:24.02
name: helloWorld
with:
args: m . /helloWorld 1 2 3
args: sh -c "chown -R root:root /github/workspace && nix-env -if . && m . /helloWorld 1 2 3"
```
???+ note
We use `chown -R root:root /github/workspace` to change the ownership
of the `/github/workspace` directory to the root user and group.
This is necessary because GitHub Actions runs each job in a new instance of a virtual
environment and assigns the `runner` user as the owner of the workspace directory.
=== "GitLab CI"
```yaml
Expand Down

0 comments on commit 11de445

Please sign in to comment.