Switch to appuser
Jekyll / jekyll (push) Failing after 17s Details

Signed-off-by: Benoit Donneaux <benoit@leastauthority.com>
This commit is contained in:
bEn 2024-05-23 11:34:47 +02:00
parent 4c11a160f4
commit 85ce376ad0
2 changed files with 6 additions and 10 deletions

View File

@ -5,6 +5,8 @@ on: [push]
env:
_UID: 1000
_GID: 1000
_USER: appuser
_GROUP: appgroup
jobs:
jekyll:
runs-on: ubuntu-22.04
@ -33,18 +35,12 @@ jobs:
- name: Build Jekyll image
id: build_image
run: |
# The environment variables _UID and _GID will impact this image
# The environment variables _UID, _GID, _USER and _GROUP will impact this image
docker-compose build jekyll
- name: Verify Jekyll container
id: verify_image
run: |
docker-compose run --rm -v "/var/lib/docker/volumes/${JOB_CONTAINER_NAME}/_data:/home/ubuntu/workspace" \
--entrypoint bash \
jekyll -c "whoami; pwd; ls -lA ."
- name: Build Jekyll site
id: build_site
run: |
docker-compose run --rm -v "/var/lib/docker/volumes/${JOB_CONTAINER_NAME}/_data:/home/ubuntu/workspace" \
docker-compose run --rm -v "${JOB_CONTAINER_NAME}:/home/${_USER}/workspace" \
jekyll build --verbose
- name: Verify site
id: verify_site

View File

@ -10,9 +10,9 @@ RUN INSTALL_PKGS="gcc g++ libyaml-dev make nodejs" && \
# Parameters for default user:group
ARG uid=1000
ARG user=ubuntu
ARG user=appuser
ARG gid=1000
ARG group=ubuntu
ARG group=appgroup
# Ensure desired user and group for build and runtime (convenient)
RUN userdel --force --remove $(getent passwd ${uid} | cut -d: -f1) || true; \