diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml index 5b452d7..f0d5b7c 100644 --- a/.github/workflows/auto-merge.yml +++ b/.github/workflows/auto-merge.yml @@ -1,11 +1,6 @@ name: Auto Merge Dependency Updates on: - pull_request_target: - types: - - opened - - synchronize - - reopened - - labeled + - pull_request_target jobs: auto-merge-dependency-updates: runs-on: ubuntu-latest @@ -17,5 +12,3 @@ jobs: cancel-in-progress: true steps: - uses: Mic92/auto-merge@main - with: - required-labels: merge-queue,dependencies diff --git a/.github/workflows/update-flake-lock.yml b/.github/workflows/update-flake-lock.yml index 323fb30..7bbce5c 100644 --- a/.github/workflows/update-flake-lock.yml +++ b/.github/workflows/update-flake-lock.yml @@ -1,21 +1,30 @@ -name: update-flake-lock +name: "Update flakes" on: - workflow_dispatch: # allows manual triggering + workflow_dispatch: schedule: - - cron: '0 0 * * 1,4' # Run twice a week -permissions: - pull-requests: write - contents: write + - cron: "0 0 * * 1,4" + jobs: - lockfile: + createPullRequest: runs-on: ubuntu-latest steps: - - name: Checkout repository - uses: actions/checkout@v6 + - uses: actions/checkout@v6 - name: Install Nix uses: cachix/install-nix-action@v31 - - name: Update flake.lock - uses: DeterminateSystems/update-flake-lock@v28 with: - pr-labels: | - merge-queue + extra_nix_config: | + access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} + - uses: actions/create-github-app-token@v1 + id: app-token + with: + app-id: ${{ vars.APP_ID }} + private-key: ${{ secrets.APP_PRIVATE_KEY }} + - name: Update flakes + run: nix flake update + - name: Create Pull Request + uses: peter-evans/create-pull-request@v7 + with: + title: "flake: update inputs" + token: ${{ steps.app-token.outputs.token }} + labels: | + auto-merge