From ec4e896d07ed99ffc3d5409c63ee8aac261a0ffd Mon Sep 17 00:00:00 2001 From: Lucien Cartier-Tilet Date: Mon, 20 Jan 2025 22:22:45 +0100 Subject: [PATCH] ci: restore publishing Docker images --- .../{publish.yaml.bak => publish.yaml} | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) rename .gitea/workflows/{publish.yaml.bak => publish.yaml} (63%) diff --git a/.gitea/workflows/publish.yaml.bak b/.gitea/workflows/publish.yaml similarity index 63% rename from .gitea/workflows/publish.yaml.bak rename to .gitea/workflows/publish.yaml index 8f2e1e4..629b013 100644 --- a/.gitea/workflows/publish.yaml.bak +++ b/.gitea/workflows/publish.yaml @@ -21,16 +21,22 @@ jobs: with: username: ${{ secrets.DOCKER_REGISTRY_USERNAME }} password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }} - registry: ${{ var.REGISTRY }} - - uses: cachix/install-nix-action@v27 + registry: ${{ vars.REGISTRY }} + - uses: cachix/install-nix-action@v30 with: nix_path: nixpkgs=channel:nixos-unstable + enable_kvm: false + # extra_nix_config: "system-features = benchmark big-parallel kvm" - name: Build Docker image + env: + HOME: ${{ gitea.workspace }} run: nix develop --command -- just backend build-docker - - name: Load Docker image - run: docker load < result + - name: Load Docker Image + run: | + docker load < ./gejdr-backend/result - name: Docker Metadata action uses: docker/metadata-action@v5.6.1 + id: meta with: image: gejdr-backend:latest tags: @@ -44,3 +50,13 @@ jobs: org.opencontainers.image.title=Backend GéJDR org.opencontainers.image.description=Backend for GéJDR org.opencontainers.image.vendor=Lucien Cartier-Tilet + - name: Retag and publish Docker image for backend + env: + TAGS: ${{ steps.meta.outputs.tags }} + run: | + for tag in ${{ steps.meta.outputs.tags }}; do + newtag=${{ vars.REGISTRY }}/$tag + echo $newtag + # docker tag gejdr-backend:latest $newtag + # docker push $newtag + done