From 0f7f56e97305c083ea3dc8615fbc719df293a6a7 Mon Sep 17 00:00:00 2001 From: Mike Christopher Date: Tue, 3 Dec 2024 16:30:28 -0800 Subject: [PATCH] feat: add nix build gha --- .github/workflows/publish.yml | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..19baa8e --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,37 @@ +name: Build & Publish + +on: + push: + branches: [main] + +env: + IMAGE_NAME: ghcr.io/${{ github.repository }} + +jobs: + build: + runs-on: ubuntu-latest + + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push Docker images + uses: iloveitaly/github-action-nixpacks@main + with: + push: true + cache: true + platforms: "linux/amd64,linux/arm64"