Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 7. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v7) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
69 lines
1.9 KiB
YAML
69 lines
1.9 KiB
YAML
name: Test Virgin User
|
|
|
|
on:
|
|
workflow_call:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
test-virgin-user:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 45
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
distro: [arch, debian, ubuntu, fedora, centos]
|
|
env:
|
|
NIX_CONFIG: |
|
|
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v7
|
|
|
|
- name: Show Docker version
|
|
run: docker version
|
|
|
|
- name: Pull base image (${{ matrix.distro }})
|
|
run: docker pull "ghcr.io/kevinveenbirkenbach/base-${{ matrix.distro }}:latest"
|
|
|
|
- name: Virgin ${{ matrix.distro }} pkgmgr test (user)
|
|
run: |
|
|
set -euo pipefail
|
|
|
|
docker run --rm \
|
|
-v "$PWD":/opt/src/pkgmgr \
|
|
-e NIX_CONFIG="${NIX_CONFIG}" \
|
|
-w /opt/src/pkgmgr \
|
|
"ghcr.io/kevinveenbirkenbach/base-${{ matrix.distro }}:latest" \
|
|
bash -lc '
|
|
set -euo pipefail
|
|
|
|
make install
|
|
|
|
useradd -m dev
|
|
echo "dev ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/dev
|
|
chmod 0440 /etc/sudoers.d/dev
|
|
chown -R dev:dev /opt/src/pkgmgr
|
|
|
|
mkdir -p /nix/store /nix/var/nix /nix/var/log/nix /nix/var/nix/profiles
|
|
chown -R dev:dev /nix
|
|
chmod 0755 /nix
|
|
chmod 1777 /nix/store
|
|
sudo -H -u dev env \
|
|
HOME=/home/dev \
|
|
NIX_CONFIG="$NIX_CONFIG" \
|
|
PKGMGR_DISABLE_NIX_FLAKE_INSTALLER=1 \
|
|
bash -lc "
|
|
set -euo pipefail
|
|
cd /opt/src/pkgmgr
|
|
make setup-venv
|
|
. \"\$HOME/.venvs/pkgmgr/bin/activate\"
|
|
|
|
pkgmgr version pkgmgr
|
|
|
|
export NIX_REMOTE=local
|
|
nix run /opt/src/pkgmgr#pkgmgr -- version pkgmgr
|
|
"
|
|
'
|