28 lines
1.2 KiB
YAML
28 lines
1.2 KiB
YAML
steps:
|
|
build-docker-image:
|
|
when:
|
|
event: [push, tag]
|
|
image: alpine:edge
|
|
commands:
|
|
- apk update && apk upgrade
|
|
- apk add --no-cache git nix --repository=https://dl-cdn.alpinelinux.org/alpine/edge/testing
|
|
- echo "system-features = nixos-test benchmark big-parallel uid-range kvm" > /etc/nix/nix.conf
|
|
- nix build --extra-experimental-features nix-command --extra-experimental-features flakes --max-jobs 16 .#docker
|
|
- cp $(nix build --extra-experimental-features nix-command --extra-experimental-features flakes --print-out-paths .#docker) ./memejoin-rs.tar.gz
|
|
volumes:
|
|
- ${AGENT_NIX_STORE_PATH}:/nix
|
|
|
|
publish-image:
|
|
when:
|
|
event: tag
|
|
image: docker
|
|
secrets: [ forgejo_token ]
|
|
commands:
|
|
- 'docker login -u ${CI_REPO_OWNER} --password $${FORGEJO_TOKEN} git.spacegirl.nl'
|
|
- 'docker image load --input memejoin-rs.tar.gz'
|
|
- 'docker image tag memejoin-rs:${CI_COMMIT_TAG} git.spacegirl.nl/${CI_REPO}:${CI_COMMIT_TAG}'
|
|
- 'docker image push git.spacegirl.nl/${CI_REPO}:${CI_COMMIT_TAG}'
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
- ${AGENT_NIX_STORE_PATH}:/nix
|