Skip to content

fix(site): nix build #525

fix(site): nix build

fix(site): nix build #525

Workflow file for this run

name: Build Images
on:
push:
branches:
- production
jobs:
legacy:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v4
- uses: ./.github/actions/image-tag
id: image-tag
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- name: Set up Nix cache
uses: DeterminateSystems/magic-nix-cache-action@main
- name: Log in to GitHub Docker Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build docker image
run: nix build ".#legacy-image"
- name: Push docker image to the registry
run: |
docker load < result
docker tag boluo-legacy:latest ghcr.io/${{ github.repository }}/legacy:${{ steps.image-tag.outputs.tag }}
docker push ghcr.io/${{ github.repository }}/legacy:${{ steps.image-tag.outputs.tag }}
site:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v4
- uses: ./.github/actions/image-tag
id: image-tag
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- name: Set up Nix cache
uses: DeterminateSystems/magic-nix-cache-action@main
- name: Log in to GitHub Docker Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build docker image
run: nix build ".#site-image"
- name: Push docker image to the registry
run: |
docker load < result
docker tag boluo-site:latest ghcr.io/${{ github.repository }}/site:${{ steps.image-tag.outputs.tag }}
docker push ghcr.io/${{ github.repository }}/site:${{ steps.image-tag.outputs.tag }}
server:
name: server
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v4
- uses: ./.github/actions/image-tag
id: image-tag
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- name: Set up Nix cache
uses: DeterminateSystems/magic-nix-cache-action@main
- name: Log in to GitHub Docker Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build docker image
run: nix build ".#server-image"
- name: Push docker image to the registry
run: |
docker load < result
docker tag boluo-server:latest ghcr.io/${{ github.repository }}/server:${{ steps.image-tag.outputs.tag }}
docker push ghcr.io/${{ github.repository }}/server:${{ steps.image-tag.outputs.tag }}