Files
testrunner/.gitea/workflows/docker-push.yaml
T
MOIS3Y 55003e35bd
Nix Docker Push Test / build-and-push (push) Failing after 2m43s
Nix with Cachix Action / test-nix (push) Successful in 47s
ci: fix auth to registry
2026-06-15 19:23:45 +09:00

42 lines
1.0 KiB
YAML

name: Nix Docker Push Test
on: [push]
permissions:
contents: read
packages: write
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v31
with:
extra_nix_config: |
experimental-features = nix-command flakes
- name: Build Docker Image with Nix
run: |
nix build .#dockerImage
cp result hello-image.tar.gz
- name: Load image to Local Docker
run: docker load < hello-image.tar.gz
- name: Login to Gitea Registry
uses: docker/login-action@v3
with:
registry: git.zhukovsky.me
username: ${{ gitea.actor }}
password: ${{ secrets.GITEA_TOKEN }}
- name: Tag and Push
run: |
REGISTRY_IMAGE="git.zhukovsky.me/$(echo ${{ gitea.repository }}"
docker tag test-nix-hello:latest $REGISTRY_IMAGE:latest
docker push $REGISTRY_IMAGE:latest