From ca3c611075f606aa163c57dab79772fabd9c1638 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 27 Jun 2024 15:32:40 +0200 Subject: [PATCH 1/2] fix: modify docker load command in nix.yaml workflow - Change the docker load command to include -i flag which specifies the input file from which to load the image/archive. This corrects the formation of the IMAGE_TAG. --- .forgejo/workflows/nix.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/nix.yaml b/.forgejo/workflows/nix.yaml index af00aed..843d729 100644 --- a/.forgejo/workflows/nix.yaml +++ b/.forgejo/workflows/nix.yaml @@ -8,7 +8,7 @@ jobs: - name: upload image run: | docker login -u ${{ secrets.REG_USER }} -p ${{ secrets.REG_TOKEN }} ${{ secrets.CI_REGISTRY }} - export IMAGE_TAG=$(docker load < result | grep -Po 'Loaded image.*: \K.*') + export IMAGE_TAG=$(docker load -i result | grep -Po 'Loaded image.*: \K.*') echo "Pushing image ${IMAGE_TAG}" docker tag "${IMAGE_TAG}" "${{ secrets.CI_REGISTRY }}/${{ secrets.REG_USER }}/nix-runner:latest" docker push "${{ secrets.CI_REGISTRY }}/${{ secrets.REG_USER }}/nix-runner:latest" From d9d76faffa0756034b107acc05871afd879cd5d0 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 27 Jun 2024 15:52:10 +0200 Subject: [PATCH 2/2] feat: add diagnostic commands to nix workflow In the nix workflow, several diagnostic commands are added prior to the docker login attempt. This includes echoing the $PATH, checking the docker location with 'which', and listing /bin directory's contents. These are intended to troubleshoot potential issues in the continuous integration environment. --- .forgejo/workflows/nix.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.forgejo/workflows/nix.yaml b/.forgejo/workflows/nix.yaml index 843d729..4efa469 100644 --- a/.forgejo/workflows/nix.yaml +++ b/.forgejo/workflows/nix.yaml @@ -7,6 +7,9 @@ jobs: - run: nix build -L .#runner - name: upload image run: | + echo $PATH + which docker + ls -al /bin docker login -u ${{ secrets.REG_USER }} -p ${{ secrets.REG_TOKEN }} ${{ secrets.CI_REGISTRY }} export IMAGE_TAG=$(docker load -i result | grep -Po 'Loaded image.*: \K.*') echo "Pushing image ${IMAGE_TAG}"