Skip to content

ops: improve ci

ops: improve ci #49

Workflow file for this run

name: Build Docker Image
on:
push:
branches:
- main
env:
REGISTRY: ghcr.io
IMAGE_NAME: ghcr.io/${{ github.repository }}
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Nix
uses: cachix/install-nix-action@v30
- name: Build Docker image
run: nix build .#docker
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push Docker image to GitHub Container Registry
id: push
run: |
docker load < result
docker tag drawbu.dev ${{ env.IMAGE_NAME }}
docker push ${{ env.IMAGE_NAME }}