Skip to content

Using direnv and nix-direnv #17

Using direnv and nix-direnv

Using direnv and nix-direnv #17

Workflow file for this run

name: Build and Push Images
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
REGISTRY: ghcr.io
jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
packages: write
strategy:
matrix:
image: [controller, proxy, builder]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: DeterminateSystems/determinate-nix-action@v3
- uses: DeterminateSystems/flakehub-cache-action@main
- name: Log in to Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build ${{ matrix.image }} image
run: nix build .#${{ matrix.image }}-image
- name: Load and push ${{ matrix.image }} image
run: |
docker load < result
docker push ${{ env.REGISTRY }}/${{ github.repository }}/${{ matrix.image }}:latest