支持用环境变量定义签名服务器地址并在 docker compose 中增加签名服务器 #268
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and publish docker container | |
on: | |
push: | |
jobs: | |
publish: | |
name: Publish container image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Cache install Nix packages | |
uses: mtoohey31/cache-flake-attrs@v2 | |
with: | |
key: ${{ runner.os }}-nix-${{ hashFiles('./flake.lock', './flake.nix', './yarn.lock') }} | |
flake_paths: .#packages.x86_64-linux.docker.copyTo | |
- name: Build and push | |
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 }} |