2024-02-17 23:33:55 +00:00
|
|
|
name: Publish docker image
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: ['main']
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
publish:
|
|
|
|
name: Publish
|
|
|
|
runs-on: docker
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install nix
|
|
|
|
uses: https://github.com/cachix/install-nix-action@v25
|
|
|
|
- name: Build image
|
|
|
|
run: "nix --extra-experimental-features 'nix-command,flakes' build .#docker"
|
2024-02-18 11:49:53 +00:00
|
|
|
- name: Log into registry
|
|
|
|
run: "nix run nixpkgs#crane -- auth login git.ashhhleyyy.dev -u ${{github.actor}} -p ${{secrets.GITHUB_TOKEN}}"
|
|
|
|
- name: Push image (latest)
|
|
|
|
run: "nix run nixpkgs#crane -- push result git.ashhhleyyy.dev/ash/aci:latest"
|
|
|
|
- nam: Push image
|
|
|
|
run: "nix run nixpkgs#crane -- push result git.ashhhleyyy.dev/ash/aci:${{github.sha}}"
|