Q2TG/.github/workflows/main.yml

25 lines
1007 B
YAML
Raw Normal View History

2022-03-02 10:36:30 +00:00
name: Build and publish docker container
on:
push:
jobs:
publish:
name: Publish container image
runs-on: ubuntu-latest
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') }}
flake_paths: .#packages.x86_64-linux.default
2022-03-02 10:36:30 +00:00
- name: Build and push
2023-01-15 02:17:46 +00:00
run: |
nix --extra-experimental-features nix-command --extra-experimental-features flakes run .#docker.copyTo -vL -- --dest-creds=${{ github.repository_owner }}:${{ secrets.GITHUB_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.GITHUB_TOKEN }} docker://ghcr.io/${GITHUB_REPOSITORY,,}:${{ github.ref_name }}