From 674eb22d2b2065ea7e82edf8c13badeab19dcc38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillem=20C=C3=B3rdoba?= Date: Sat, 17 Aug 2024 17:46:44 +0200 Subject: [PATCH] Fixed workflow --- .../build-compare-dnas-integrity.yaml | 38 +++++++++++++++++++ .../workflows/build-scaffold-remote-zome.yml | 16 ++++---- ...ild-sync-npm-git-dependencies-with-nix.yml | 20 ++++------ 3 files changed, 54 insertions(+), 20 deletions(-) create mode 100644 .github/workflows/build-compare-dnas-integrity.yaml diff --git a/.github/workflows/build-compare-dnas-integrity.yaml b/.github/workflows/build-compare-dnas-integrity.yaml new file mode 100644 index 0000000..8a52878 --- /dev/null +++ b/.github/workflows/build-compare-dnas-integrity.yaml @@ -0,0 +1,38 @@ +name: "build-compare-dnas-integrity" +on: + # Trigger the workflow on push or pull request, + # but only for the main branch + push: + branches: [ main ] + +jobs: + build-and-cache: + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v4 + + uses: cachix/install-nix-action@v27 + with: + github_access_token: ${{ secrets.GITHUB_TOKEN }} + nix_path: nixpkgs=channel:nixos-24.05 + + - uses: cachix/cachix-action@v15 + with: + name: holochain-ci + + - uses: cachix/cachix-action@v15 + with: + name: holochain-open-dev + + - name: Build compare-dnas-integrity + env: + CACHIX_AUTH_TOKEN: "${{ secrets.CACHIX_TOKEN_HOLOCHAIN_OPEN_DEV }}" + run: | + cachix watch-exec holochain-open-dev -- nix build --no-update-lock-file --accept-flake-config -L .#compare-dnas-integrity + cachix push holochain-open-dev $(nix path-info --json --accept-flake-config --no-warn-dirty .#compare-dnas-integrity | nix run nixpkgs#jq -- -r 'keys[0]') + cachix pin holochain-open-dev compare-dnas-integrity $(nix path-info --json --accept-flake-config --no-warn-dirty .#compare-dnas-integrity | nix run nixpkgs#jq -- -r 'keys[0]') diff --git a/.github/workflows/build-scaffold-remote-zome.yml b/.github/workflows/build-scaffold-remote-zome.yml index 9f7da78..80be453 100644 --- a/.github/workflows/build-scaffold-remote-zome.yml +++ b/.github/workflows/build-scaffold-remote-zome.yml @@ -16,16 +16,16 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install nix - uses: cachix/install-nix-action@v25 + uses: cachix/install-nix-action@v27 with: - nix_path: nixpkgs=channel:nixos-unstable + github_access_token: ${{ secrets.GITHUB_TOKEN }} + nix_path: nixpkgs=channel:nixos-24.05 - - uses: cachix/cachix-action@v14 + - uses: cachix/cachix-action@v15 with: name: holochain-ci - - uses: cachix/cachix-action@v14 + - uses: cachix/cachix-action@v15 with: name: holochain-open-dev @@ -33,6 +33,6 @@ jobs: env: CACHIX_AUTH_TOKEN: "${{ secrets.CACHIX_TOKEN_HOLOCHAIN_OPEN_DEV }}" run: | - nix build -L .#scaffold-remote-zome - cachix push holochain-open-dev $(nix path-info .#scaffold-remote-zome) - cachix pin holochain-open-dev scaffold-remote-zome $(nix path-info .#scaffold-remote-zome) + cachix watch-exec holochain-open-dev -- nix build --no-update-lock-file --accept-flake-config -L .#scaffold-remote-zome + cachix push holochain-open-dev $(nix path-info --json --accept-flake-config --no-warn-dirty .#scaffold-remote-zome | nix run nixpkgs#jq -- -r 'keys[0]') + cachix pin holochain-open-dev scaffold-remote-zome $(nix path-info --json --accept-flake-config --no-warn-dirty .#scaffold-remote-zome | nix run nixpkgs#jq -- -r 'keys[0]') diff --git a/.github/workflows/build-sync-npm-git-dependencies-with-nix.yml b/.github/workflows/build-sync-npm-git-dependencies-with-nix.yml index 45fd7a0..7e35006 100644 --- a/.github/workflows/build-sync-npm-git-dependencies-with-nix.yml +++ b/.github/workflows/build-sync-npm-git-dependencies-with-nix.yml @@ -18,27 +18,23 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install nix - uses: cachix/install-nix-action@v25 + uses: cachix/install-nix-action@v27 with: - nix_path: nixpkgs=channel:nixos-unstable + github_access_token: ${{ secrets.GITHUB_TOKEN }} + nix_path: nixpkgs=channel:nixos-24.05 - - uses: cachix/cachix-action@v14 + - uses: cachix/cachix-action@v15 with: name: holochain-ci - - uses: cachix/cachix-action@v14 + - uses: cachix/cachix-action@v15 with: name: holochain-open-dev - name: Build sync-npm-git-dependencies-with-nix - run: | - nix build -L .#sync-npm-git-dependencies-with-nix - - - name: Cache sync-npm-git-dependencies-with-nix - if: github.event_name != 'pull_request' env: CACHIX_AUTH_TOKEN: "${{ secrets.CACHIX_TOKEN_HOLOCHAIN_OPEN_DEV }}" run: | - cachix push holochain-open-dev $(nix path-info .#sync-npm-git-dependencies-with-nix) - cachix pin holochain-open-dev sync-npm-git-dependencies-with-nix $(nix path-info .#sync-npm-git-dependencies-with-nix) + cachix watch-exec holochain-open-dev -- nix build --no-update-lock-file --accept-flake-config -L .#sync-npm-git-dependencies-with-nix + cachix push holochain-open-dev $(nix path-info --json --accept-flake-config --no-warn-dirty .#sync-npm-git-dependencies-with-nix | nix run nixpkgs#jq -- -r 'keys[0]') + cachix pin holochain-open-dev sync-npm-git-dependencies-with-nix $(nix path-info --json --accept-flake-config --no-warn-dirty .#sync-npm-git-dependencies-with-nix | nix run nixpkgs#jq -- -r 'keys[0]')