Skip to content

Commit

Permalink
Fix problem where some commands do need to run as root
Browse files Browse the repository at this point in the history
+ Actually create the UID 1001 user so it has a home directory to
  store files like .gitconfig (and Python configuration files).
  • Loading branch information
EliahKagan committed Feb 8, 2024
1 parent e42e496 commit 815f983
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/alpine-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@ jobs:

container:
image: alpine:latest
options: --user 1001

defaults:
run:
shell: sh -exo pipefail {0}
shell: sudo -u runner sh -exo pipefail {0}

steps:
- name: Install Alpine Linux packages
- name: Prepare Alpine Linux
run: |
apk add git git-daemon python3 py3-pip
apk add sudo git git-daemon python3 py3-pip
adduser -D -u 1001 runner
shell: sh -exo pipefail {0} # Run this as root, not the "runner" user.

- uses: actions/checkout@v4
with:
Expand Down

0 comments on commit 815f983

Please sign in to comment.