docker
Some checks failed
docker / build (push) Failing after 1m48s

This commit is contained in:
Elijah McMorris 2025-08-21 13:22:08 -07:00
parent f99ac2d6b3
commit cc6ed61f8c
Signed by: NexVeridian
SSH key fingerprint: SHA256:bsA1SKZxuEcEVHAy3gY1HUeM5ykRJl0U0kQHQn0hMg8

View file

@ -35,8 +35,8 @@ jobs:
steps: steps:
- run: nix run -I nixpkgs=channel:nixos-unstable nixpkgs#attic-client login nex https://nix.nexveridian.com ${{ secrets.ATTIC_TOKEN }} || true - run: nix run -I nixpkgs=channel:nixos-unstable nixpkgs#attic-client login nex https://nix.nexveridian.com ${{ secrets.ATTIC_TOKEN }} || true
- run: nix run -I nixpkgs=channel:nixos-unstable nixpkgs#attic-client cache create NexVeridian-web || true - run: nix run -I nixpkgs=channel:nixos-unstable nixpkgs#attic-client cache create nexveridian-web || true
- run: nix run -I nixpkgs=channel:nixos-unstable nixpkgs#attic-client use NexVeridian-web || true - run: nix run -I nixpkgs=channel:nixos-unstable nixpkgs#attic-client use nexveridian-web || true
- name: Install Node.js - name: Install Node.js
run: | run: |
@ -48,13 +48,22 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
# Install Docker from Nix # Check Docker availability
# - name: Install Docker - name: Check Docker
# run: | run: |
# mkdir -p ~/.local/docker echo "Checking for Docker..."
# nix build -I nixpkgs=channel:nixos-unstable nixpkgs#docker -o ~/.local/docker if command -v docker &> /dev/null; then
# ln -sf ~/.local/docker/bin/docker ~/.local/bin/docker echo "Docker found at: $(which docker)"
# ln -sf ~/.local/docker/bin/dockerd ~/.local/bin/dockerd docker version || echo "Docker command failed"
else
echo "Docker not found, installing from Nix..."
rm -rf ~/.local/docker
mkdir -p ~/.local/docker
nix build -I nixpkgs=channel:nixos-unstable nixpkgs#docker -o ~/.local/docker
ln -sf ~/.local/docker/bin/docker ~/.local/bin/docker
echo "Docker installed at: $(which docker)"
docker version || echo "Docker command failed after install"
fi
# Login against a Docker registry except on PR # Login against a Docker registry except on PR
# https://github.com/docker/login-action # https://github.com/docker/login-action
@ -95,7 +104,18 @@ jobs:
docker tag ${{ env.STRIP_REPO_USERNAME }}:latest ${{ env.REGISTRY }}/${{ env.REPO }}:latest docker tag ${{ env.STRIP_REPO_USERNAME }}:latest ${{ env.REGISTRY }}/${{ env.REPO }}:latest
docker push ${{ env.REGISTRY }}/${{ env.REPO }}:latest docker push ${{ env.REGISTRY }}/${{ env.REPO }}:latest
# - run: | - name: Push to attic
# for i in {1..10}; do if: always()
# nix run -I nixpkgs=channel:nixos-unstable nixpkgs#attic-client push NexVeridian-web /nix/store/*/ && break || [ $i -eq 5 ] || sleep 5 run: |
# done valid_paths=""
for path in /nix/store/*/; do
if nix path-info "$path" >/dev/null 2>&1; then
valid_paths="$valid_paths $path"
fi
done
if [ -n "$valid_paths" ]; then
for i in {1..10}; do
nix run -I nixpkgs=channel:nixos-unstable nixpkgs#attic-client push nexveridian-web $valid_paths && break || [ $i -eq 5 ] || sleep 5
done
fi