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`

Signed-off-by: Robin Quintero <rohaquinlop301@gmail.com>
  • Loading branch information
rohaquinlop committed May 22, 2024
1 parent 1afab69 commit 5608af2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@ concurrency:
cancel-in-progress: true
group: ${{ github.actor }}
jobs:
formatBash:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222
with:
fetch-depth: 0
- uses: docker://ghcr.io/fluidattacks/makes/amd64:latest
name: /formatBash
with:
args: sh -c "git config --global --add safe.directory /github/workspace && m . /formatBash"

linux_all:
runs-on: ubuntu-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 5608af2

Please sign in to comment.