Skip to content

Commit

Permalink
using github user as actions has a bug actions/runner#863
Browse files Browse the repository at this point in the history
  • Loading branch information
lukegriffith committed Aug 17, 2024
1 parent 3ece913 commit ea47cb4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
16 changes: 8 additions & 8 deletions neovim.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ LABEL maintainer="Luke Griffith <[email protected]>"
RUN apk add --no-cache neovim git curl editorconfig gcc make musl-dev go npm python3 bash shadow

# Create a new user with a home directory
RUN useradd -m -d /home/nvim_user -s /bin/sh nvim_user
RUN chmod 777 /home/nvim_user
RUN chown -R nvim_user:nvim_user /home/nvim_user
RUN useradd -m -d /home/github -s /bin/sh github
RUN chmod 777 /home/github
RUN chown -R github:github /home/github

# Set the new user as the default user
USER nvim_user
USER github

# Set the working directory to the new user's home
WORKDIR /home/nvim_user
WORKDIR /home/github


RUN ls -la /home

ADD setup-nvim-container.sh /home/nvim_user/setup-nvim-container.sh
ADD package-config.sh /home/nvim_user/package-config.sh
ADD setup-nvim-container.sh /home/github/setup-nvim-container.sh
ADD package-config.sh /home/github/package-config.sh

RUN bash /home/nvim_user/setup-nvim-container.sh
RUN bash /home/github/setup-nvim-container.sh

WORKDIR /src

Expand Down
2 changes: 1 addition & 1 deletion package-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ nvim \
-c "MasonInstall $formatted_tools" \
-c "qa"

tar -czvf nvim-offline-deps.tar.gz /nvim_user/.config/nvim /nvim_user/.local/{share,state}/nvim
tar -czvf nvim-offline-deps.tar.gz /github/.config/nvim /github/.local/{share,state}/nvim



8 changes: 4 additions & 4 deletions setup-nvim-container.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

mkdir -p /home/nvim_user/bare_config /home/nvim_user/.config/nvim
git clone --bare https://github.com/lukegriffith/kickstart.nvim /home/nvim_user/bare_config
git --git-dir=/home/nvim_user/bare_config --work-tree=/home/nvim_user/.config/nvim pull
git --git-dir=/home/nvim_user/bare_config --work-tree=/home/nvim_user/.config/nvim checkout -f
mkdir -p /home/github/bare_config /home/github/.config/nvim
git clone --bare https://github.com/lukegriffith/kickstart.nvim /home/github/bare_config
git --git-dir=/home/github/bare_config --work-tree=/home/github/.config/nvim pull
git --git-dir=/home/github/bare_config --work-tree=/home/github/.config/nvim checkout -f

0 comments on commit ea47cb4

Please sign in to comment.