name: "Update Dependencies" on: workflow_dispatch: schedule: - cron: '0 0 * * FRI' jobs: update-deps: name: Update dependencies runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: cachix/install-nix-action@v18 with: extra_nix_config: | extra-substituters = https://nix-community.cachix.org extra-trusted-public-keys = nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= - name: Create PRs for dependencies env: GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_BASE_BRANCH: master run: | nix develop -c .github/workflows/update_flake_lock.py - name: Create PR for updated init.el env: GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_BASE_BRANCH: master run: | nix develop -c .github/workflows/update_init_el.py automerge-deps: name: Automerge dependency updates needs: [update-deps] runs-on: ubuntu-latest steps: - name: Configure git run: | git config --global core.autocrlf false git config --global user.name github-actions[bot] git config --global user.email 41898282+github-actions[bot]@users.noreply.github.com git config --global init.defaultBranch main git config --global pull.rebase false - uses: actions/checkout@v3 - uses: cachix/install-nix-action@v18 with: extra_nix_config: | extra-substituters = https://nix-community.cachix.org extra-trusted-public-keys = nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= - name: Run test_dep_update env: GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_BASE_BRANCH: develop run: | nixpkgs="$(nix eval --impure --expr 'toString (builtins.getFlake (toString ./.)).inputs.nixpkgs' | tr -d '"')" nix-store --realize "$nixpkgs" NIX_PATH=nixpkgs="$nixpkgs" .github/workflows/test_dep_update.sh