Files
testrunner/.gitea/workflows/docker-push.yaml
T
MOIS3Y 20df4053d0
Nix Docker Push Test / build-and-push (push) Successful in 1m22s
Nix with Cachix Action / test-nix (push) Successful in 41s
ci: fix uppercase
2026-06-15 19:48:17 +09:00

43 lines
1.1 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@v4
with:
registry: git.zhukovsky.me
username: ${{ gitea.actor }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Tag and Push
run: |
REGISTRY_IMAGE="git.zhukovsky.me/$(echo ${{ gitea.repository }} | tr '[:upper:]' '[:lower:]')"
echo "Pushing image to: $REGISTRY_IMAGE"
docker tag test-nix-hello:latest $REGISTRY_IMAGE:latest
docker push $REGISTRY_IMAGE:latest