Skip to content

Commit

Permalink
Fixed workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
guillemcordoba committed Aug 8, 2024
1 parent 02de16b commit 8f6e184
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ jobs:
- name: Extend space
uses: ./.github/actions/extend-space

- 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: Install and test
run: |
nix develop --command bash -c "npm i && npm t && npm run build -w ui"
nix develop --no-update-lock-file --command bash -c "npm i && npm t && npm run build -w ui"
58 changes: 58 additions & 0 deletions .github/workflows/update-flake-inputs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Update flake inputs
on:
schedule:
- cron: "0 7 * * *" # Run every day at 7AM

permissions:
pull-requests: write
contents: write

jobs:
update-flake-inputs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install nix
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: Update Flake
run: |
nix flake update
nix develop
- uses: dorny/paths-filter@v3
id: changes
with:
filters: |
flake_lock:
- 'flake.lock'
package_json:
- '**/*/package.json'
- name: Create Pull Request
id: cpr
if: steps.changes.outputs.src == 'true'
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.PAT }}

- name: Enable Pull Request Automerge
if: steps.changes.outputs.src == 'true' && steps.cpr.outputs.pull-request-operation == 'created'
uses: peter-evans/enable-pull-request-automerge@v3
with:
token: ${{ secrets.PAT }}
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
merge-method: squash

0 comments on commit 8f6e184

Please sign in to comment.