This commit is contained in:
parent
59e869d8c8
commit
3442aeec1d
1 changed files with 7 additions and 12 deletions
|
@ -13,24 +13,19 @@ jobs:
|
||||||
runs-on: nix-flakes
|
runs-on: nix-flakes
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Set up packages
|
- name: Test
|
||||||
run: |
|
run: |
|
||||||
echo "extra-substituters = https://builder.naxdy.org/attic" >> /etc/nix/nix.conf
|
attic -V
|
||||||
echo "extra-trusted-public-keys = attic:05LdE8Nav5Qd1E+KOJqSwdr+WE1z8AUmSb3oKL7s8dk=" >> /etc/nix/nix.conf
|
|
||||||
nix profile install nixpkgs#nodejs nixpkgs#jq nixpkgs#docker "github:zhaofengli/attic?ref=6eabc3f02fae3683bffab483e614bebfcd476b21"
|
|
||||||
echo "PATH=/nix/var/nix/profiles/per-user/root/profile/bin:$PATH" >> "$GITHUB_ENV"
|
|
||||||
- name: Set up attic binary cache
|
- name: Set up attic binary cache
|
||||||
run: |
|
uses: https://git.naxdy.org/NaxdyOrg/attic-action@v0.3
|
||||||
attic login "${{ vars.BINARY_CACHE_NAME }}" "${{ vars.BINARY_CACHE_URL }}" "${{ secrets.BINARY_CACHE_AUTH_KEY }}"
|
with:
|
||||||
attic use "${{ vars.BINARY_CACHE_NAME }}"
|
endpoint: "${{ vars.BINARY_CACHE_URL }}"
|
||||||
|
token: "${{ secrets.BINARY_CACHE_AUTH_KEY }}"
|
||||||
|
cache: "${{ vars.BINARY_CACHE_NAME }}"
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Build docker image
|
- name: Build docker image
|
||||||
run: |
|
run: |
|
||||||
nix build .# -j 4
|
nix build .# -j 4
|
||||||
- name: Push derivations to binary cache
|
|
||||||
run: |
|
|
||||||
cd /nix/store
|
|
||||||
attic push "${{ vars.BINARY_CACHE_NAME }}" $(ls /nix/store --ignore='*.drv' --ignore='*fake_nixpkgs*')
|
|
||||||
- name: Push docker image to registry
|
- name: Push docker image to registry
|
||||||
run: |
|
run: |
|
||||||
docker login -u "${{ vars.UPSTREAM_USER }}" -p "${{ secrets.UPSTREAM_PASS }}" "${{ vars.UPSTREAM_REPO }}"
|
docker login -u "${{ vars.UPSTREAM_USER }}" -p "${{ secrets.UPSTREAM_PASS }}" "${{ vars.UPSTREAM_REPO }}"
|
||||||
|
|
Loading…
Reference in a new issue