ci: restore publishing Docker images
Some checks failed
CI / tests (push) Has been cancelled
Publish Docker image / publish (pull_request) Failing after 8m35s
CI / tests (pull_request) Failing after 36m36s

This commit is contained in:
Lucien Cartier-Tilet 2025-01-20 22:22:45 +01:00
parent 31dd1c41e3
commit 41fb8bd508
Signed by: phundrak
GPG Key ID: 347803E8073EACE0

View File

@ -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
extra_nix_config: |
sandbox = true
- 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 <lucien@phundrak.com>
- 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