update flake

Update CL:
This commit is contained in:
AwesomeQubic 2024-01-18 11:06:47 +01:00
parent 4c76ac7224
commit 590b0196e7
2 changed files with 37 additions and 15 deletions

View file

@ -5,10 +5,13 @@ on:
push:
branches:
- main
env:
# Required to make some things output color
TERM: ansi
REGISTRY: ghcr.io
REPOSITORY: ${{ github.repository }}
TAG: latest
jobs:
ci:
@ -16,6 +19,10 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Sync repository
uses: actions/checkout@v4
@ -44,13 +51,13 @@ jobs:
run: nix-env -f "<nixpkgs>" -i direnv -i nix-direnv
- name: Pop/push downloaded crate cache
uses: actions/cache@v4
uses: actions/cache@v3
with:
key: downloaded-crates
path: ~/.cargo
- name: Pop/push compiled crate cache
uses: actions/cache@v4
uses: actions/cache@v3
with:
key: compiled-crates-${{runner.os}}
path: target
@ -63,3 +70,18 @@ jobs:
run: |
direnv allow
direnv exec . engage
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build docker image
run: nix build .#oci-image
- name: Push docker image to DockerHub
run: |
docker load < result
docker push ${{ env.REPOSITORY }}:${{ env.TAG }}