Skip to content

[ng-server] Implement ng-server #387

[ng-server] Implement ng-server

[ng-server] Implement ng-server #387

Workflow file for this run

name: Build
on: [push]
jobs:
build-packages:
name: Build packages
timeout-minutes: 30
runs-on:
- self-hosted
- nix
- general
- ${{ matrix.runner.runner }}
- ${{ matrix.runner.size }}
strategy:
matrix:
runner:
- arch: x86_64-linux
runner: amd64-linux
size: medium
- arch: aarch64-linux
runner: arm64-linux
size: medium
- arch: aarch64-darwin
runner: arm64-darwin
size: small
steps:
- uses: actions/checkout@v3
- name: Build all packages
run: |
nix build -L -v '.#defaultPackage.${{ matrix.runner.arch }}'
- name: Cache all packages
env:
NIX_OUTPUT: .#defaultPackage.${{ matrix.runner.arch }}
shell: nix develop -c bash {0}
run: |
nix store sign "${NIX_OUTPUT}" -v -r -k ~/.secrets/nix-cache-private-key
nix copy -v --to s3://nixed/cache "${NIX_OUTPUT}"
build-push-images:
name: Build and push images
timeout-minutes: 20
runs-on:
- self-hosted
- nix
- general
- ${{ matrix.imageArch }}-linux
- medium
needs: [build-packages]
env:
IMAGE_REPOSITORY: public.ecr.aws/shopstic
strategy:
matrix:
imageArch: [amd64, arm64]
defaults:
run:
shell: nix develop -c bash {0}
steps:
- uses: actions/checkout@v3
- name: Build all images
run: |
./cli.sh build_all_images ${{ matrix.imageArch }}
- name: Push all images
if: github.ref == 'refs/heads/main'
run: |
./cli.sh push_all_single_arch_images ${{ matrix.imageArch }}
push-manifests:
name: Build and push multi-arch manifests
timeout-minutes: 20
runs-on: [self-hosted, nix, general, arm64-linux, small]
needs: [build-push-images]
if: github.ref == 'refs/heads/main'
env:
IMAGE_REPOSITORY: public.ecr.aws/shopstic
defaults:
run:
shell: nix develop -c bash {0}
steps:
- uses: actions/checkout@v3
- name: Build and push images
run: |
./cli.sh push_all_manifests