From ac9eaef2670a680db8867d908f7fd0177dd0a148 Mon Sep 17 00:00:00 2001 From: Aumetra Weisman Date: Mon, 2 Dec 2024 10:38:49 +0000 Subject: [PATCH] Nightly docker image builds (#618) --- .github/workflows/nightly-docker.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/nightly-docker.yml diff --git a/.github/workflows/nightly-docker.yml b/.github/workflows/nightly-docker.yml new file mode 100644 index 000000000..8838c5409 --- /dev/null +++ b/.github/workflows/nightly-docker.yml @@ -0,0 +1,28 @@ +name: Nightly Docker Build + +on: + schedule: + - cron: "0 1 * * *" + workflow_dispatch: + +permissions: + packages: write + +jobs: + build-container: + name: Build nightly container + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: DeterminateSystems/nix-installer-action@v4 + - uses: DeterminateSystems/magic-nix-cache-action@main + - name: Build image with Nix + run: "nix build .#main-docker" + - name: Load Docker image + run: "docker image load < result" + - name: Rename image to ghcr.io repo + run: "docker tag kitsune:latest ghcr.io/kitsune-soc/kitsune:nightly" + - name: Log in to ghcr.io + run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin + - name: Push to ghcr.io + run: "docker push ghcr.io/kitsune-soc/kitsune:nightly"