2022-03-02 10:36:30 +00:00
|
|
|
name: Build and publish docker container
|
|
|
|
|
|
|
|
on:
|
2023-01-19 08:02:12 +00:00
|
|
|
workflow_dispatch:
|
2022-03-02 10:36:30 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
publish:
|
|
|
|
name: Publish container image
|
2023-02-18 18:18:51 +00:00
|
|
|
## runs-on: ubuntu-latest
|
|
|
|
runs-on: self-hosted
|
2022-03-02 10:36:30 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2023-01-15 02:17:46 +00:00
|
|
|
uses: actions/checkout@v3
|
2022-03-02 10:36:30 +00:00
|
|
|
|
2023-01-15 02:17:46 +00:00
|
|
|
- name: Cache install Nix packages
|
|
|
|
uses: mtoohey31/cache-flake-attrs@v2
|
2022-03-02 10:36:30 +00:00
|
|
|
with:
|
2023-01-15 02:17:46 +00:00
|
|
|
key: ${{ runner.os }}-nix-${{ hashFiles('./flake.lock', './flake.nix', './yarn.lock') }}
|
2023-01-15 07:41:31 +00:00
|
|
|
flake_paths: .#packages.x86_64-linux.docker.copyTo
|
2022-03-02 10:36:30 +00:00
|
|
|
|
|
|
|
- name: Build and push
|
2023-01-15 02:17:46 +00:00
|
|
|
run: |
|
2023-01-18 16:53:02 +00:00
|
|
|
nix --extra-experimental-features nix-command --extra-experimental-features flakes run .#docker.copyTo -vL -- --dest-creds=${{ github.repository_owner }}:${{ secrets.PACKAGES_TOKEN }} docker://ghcr.io/${GITHUB_REPOSITORY,,}:${{ github.sha }}
|
|
|
|
nix --extra-experimental-features nix-command --extra-experimental-features flakes run .#docker.copyTo -vL -- --dest-creds=${{ github.repository_owner }}:${{ secrets.PACKAGES_TOKEN }} docker://ghcr.io/${GITHUB_REPOSITORY,,}:${{ github.ref_name }}
|