Update flake inputs #236
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: Update flake inputs | |
on: | |
schedule: | |
- cron: "0 7 * * *" # Run every day at 7AM | |
permissions: | |
pull-requests: write | |
contents: write | |
jobs: | |
automerge: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install nix | |
uses: cachix/install-nix-action@v25 | |
with: | |
nix_path: nixpkgs=channel:nixos-unstable | |
- uses: cachix/cachix-action@v14 | |
with: | |
name: holochain-ci | |
- uses: cachix/cachix-action@v14 | |
with: | |
name: holochain-open-dev | |
- name: Update Flake | |
run: | | |
nix flake update | |
nix develop | |
- name: Update example repository | |
run: | | |
nix flake update | |
nix develop --command bash -c "cd nix/fixtures/module-repo && cargo update" | |
nix develop --command bash -c "cd nix/reference-happ && cargo update" | |
- uses: dorny/paths-filter@v3 | |
id: changes | |
with: | |
filters: | | |
flake_lock: | |
- 'flake.lock' | |
package_json: | |
- '**/*/package.json' | |
cargo_lock: | |
- '**/*/Cargo.lock' | |
- name: Create Pull Request | |
id: cpr | |
if: steps.changes.outputs.flake_lock == 'true' || steps.changes.outputs.package_json == 'true' | |
uses: peter-evans/create-pull-request@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Enable Pull Request Automerge | |
if: (steps.changes.outputs.flake_lock == 'true' || steps.changes.outputs.package_json == 'true') && steps.cpr.outputs.pull-request-operation == 'created' | |
uses: peter-evans/enable-pull-request-automerge@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }} | |
merge-method: squash |