38 lines
1.2 KiB
YAML
38 lines
1.2 KiB
YAML
name: Deploy
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
|
|
env:
|
|
REGISTRY: ghcr.io
|
|
IMAGE_NAME: ${{ github.repository }}
|
|
|
|
jobs:
|
|
checks:
|
|
name: "Deploy"
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: cachix/install-nix-action@v21
|
|
with:
|
|
nix_path: nixpkgs=channel:nixos-stable
|
|
extra_nix_config: |
|
|
experimental-features = nix-command flakes
|
|
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
|
system-features = nixos-test benchmark big-parallel kvm
|
|
- uses: cachix/cachix-action@v12
|
|
with:
|
|
name: pad-archiver
|
|
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
|
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
|
- run: nix --experimental-features 'nix-command flakes' build .#dockerImage -L
|
|
- run: docker load -i ./result/image.tar.gz
|
|
- run: docker tag pad-archiver ${{ env.IMAGE_NAME }}
|
|
- name: Log in to the Container registry
|
|
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- run: docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|