workflow: add new lines
This commit is contained in:
parent
048800c0bf
commit
47e5c5cd77
2 changed files with 21 additions and 0 deletions
8
.github/workflows/build-packages.yml
vendored
8
.github/workflows/build-packages.yml
vendored
|
@ -6,6 +6,7 @@ on:
|
|||
description: "package to build"
|
||||
required: false
|
||||
type: string
|
||||
|
||||
env:
|
||||
ATTIC_TOKEN: ${{ secrets.ATTIC_TOKEN }}
|
||||
NIX_CONFIG: |
|
||||
|
@ -18,6 +19,7 @@ env:
|
|||
TERM: ansi
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets. AWS_SECRET_ACCESS_KEY }}
|
||||
|
||||
jobs:
|
||||
build-packages:
|
||||
strategy:
|
||||
|
@ -31,9 +33,11 @@ jobs:
|
|||
# - macos-latest
|
||||
# - macos-13
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- name: setup binary cache key
|
||||
run: echo "${{ secrets.NIX_CACHE_SECRET_KEY }}" >> /home/runner/cache-priv-key.pem
|
||||
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@v30
|
||||
|
||||
|
@ -51,15 +55,19 @@ jobs:
|
|||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- run: nix build -L ${{ matrix.package }}
|
||||
|
||||
- name: cache result
|
||||
if: always()
|
||||
run: |
|
||||
nix copy -j8 \
|
||||
--to 's3://nixcache?endpoint=s3.cy7.sh&secret-key=/home/runner/cache-priv-key.pem' \
|
||||
$(nix path-info --recursive --derivation "${{ matrix.package }}" |sed 's/\.drv$/.drv^*/')
|
||||
|
||||
- name: prepare tarball to upload
|
||||
run: nix run github:nixos/nixpkgs#gnutar hcvf result.tar result
|
||||
|
||||
- name: upload result
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue