producer-consumer/.forgejo/workflows/build_docker_images.yaml
2005 a0ba1c7d56
Some checks failed
CD / docker (push) Failing after 40s
cd: flake.nix added container packages
.forgejo: added cd and publishing for containers
2024-08-25 03:48:11 +02:00

45 lines
1.5 KiB
YAML

name: CD
on:
push:
branches: ["master"]
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU for docker
uses: https://github.com/docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: https://github.com/docker/setup-buildx-action@v3
-
name: Set up nix cachix
uses: https://github.com/DeterminateSystems/magic-nix-cache-action@main
-
name: Login to git.4o1x5.dev container registry
uses: docker/login-action@v3
with:
registry: git.4o1x5.dev
username: ${{ secrets.GIT_USERNAME }}
password: ${{ secrets.GIT_TOKEN }}
-
name: Setup nix for building
uses: https://github.com/cachix/install-nix-action@v27
with:
# add kvm support
extra_nix_config: |
system-features = nixos-test benchmark big-parallel kvm
-
name: Build, import, tag and push producer container
run: nix build .#producer-container && docker image load --input result && docker image tag producer:latest git.4o1x5.dev/4o1x5/producer:latest && docker image push git.4o1x5.dev/4o1x5/producer:latest
-
name: Build, import, tag and push consumer container
run: nix build .#consumer-container && docker image load --input result && docker image tag consumer:latest git.4o1x5.dev/4o1x5/consumer:latest && docker image push git.4o1x5.dev/4o1x5/consumer:latest