fix: err #210
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 cache | |
on: | |
push: | |
jobs: | |
generate-matrix: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@main | |
with: | |
extra-conf: | | |
substituters = https://attic.indexyz.me/indexyz https://indexyz.cachix.org https://cache.nixos.org/ | |
trusted-public-keys = indexyz:XxexOMK+bHXR2slT4A9wnJg00EZFXCUYqlUhlEEGQEc= indexyz.cachix.org-1:biBEnuZ4vTSsVMr8anZls+Lukq8w4zTHAK8/p+fdaJQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= | |
- run: python .ci/build-matrix.py | |
id: set-matrix | |
build: | |
name: Build ${{ matrix.pacakges.name }} | |
runs-on: ubuntu-latest | |
if: needs.generate-matrix.outputs.matrix != '' | |
needs: [generate-matrix] | |
strategy: | |
fail-fast: false | |
max-parallel: 6 | |
matrix: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@main | |
with: | |
extra-conf: | | |
substituters = https://attic.indexyz.me/indexyz https://indexyz.cachix.org https://cache.nixos.org/ | |
trusted-public-keys = indexyz:XxexOMK+bHXR2slT4A9wnJg00EZFXCUYqlUhlEEGQEc= indexyz.cachix.org-1:biBEnuZ4vTSsVMr8anZls+Lukq8w4zTHAK8/p+fdaJQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= | |
- name: Build packages | |
run: | | |
set -ex | |
nix profile install nixpkgs#attic-client | |
attic login indexyz https://attic.indexyz.me "${{ secrets.ATTIC_TOKEN }}" | |
nix --version | |
PACKAGE="${{ matrix.pacakges.name }}" | |
nix build --no-link ".#"$PACKAGE | |
echo "Build Package Successfully"s | |
PACKAGE_LOCATION=$(nix eval --raw ".#"$PACKAGE) | |
echo "Package location: $PACKAGE_LOCATION" | |
attic push indexyz $PACKAGE_LOCATION | |
PACKAGE_DRV_LOCATION=$(nix eval --raw ".#"$PACKAGE".drvPath") | |
echo "Package drv location: $PACKAGE_DRV_LOCATION" | |
attic push indexyz $PACKAGE_DRV_LOCATION |