From 51e8ce73819e251d9fbe45da380868c868e08933 Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Fri, 9 Feb 2024 14:16:37 +0900 Subject: [PATCH] Update reusable action to update flake.lock Closes #486 --- .github/workflows/merge-bot-pr.yml | 17 +++++++++++++++-- .../update-nixpkgs-and-versions-in-ci.yml | 2 +- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/merge-bot-pr.yml b/.github/workflows/merge-bot-pr.yml index 6e9ce901..288b8997 100644 --- a/.github/workflows/merge-bot-pr.yml +++ b/.github/workflows/merge-bot-pr.yml @@ -16,7 +16,6 @@ jobs: - name: Dependabot metadata id: metadata uses: dependabot/fetch-metadata@v1.6.0 - - uses: actions/checkout@v4 - name: Wait other jobs if: ${{steps.metadata.outputs.update-type != 'version-update:semver-major'}} uses: kachick/wait-other-jobs@v2.0.2 @@ -43,7 +42,6 @@ jobs: runs-on: ubuntu-latest if: ${{ github.actor == 'renovate[bot]' }} steps: - - uses: actions/checkout@v4 - name: Wait other jobs uses: kachick/wait-other-jobs@v2.0.2 timeout-minutes: 10 @@ -52,3 +50,18 @@ jobs: env: PR_URL: ${{ github.event.pull_request.html_url }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # https://github.com/kachick/anylang-template/issues/51 + selfup-runner: + timeout-minutes: 30 + runs-on: ubuntu-latest + if: ${{ github.actor == 'selfup-runner[bot]' }} + steps: + - name: Wait other jobs + uses: kachick/wait-other-jobs@v2.0.2 + timeout-minutes: 20 + - name: Approve and merge + run: gh pr review --approve "$PR_URL" && gh pr merge --auto --delete-branch --squash "$PR_URL" + env: + PR_URL: ${{ github.event.pull_request.html_url }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/update-nixpkgs-and-versions-in-ci.yml b/.github/workflows/update-nixpkgs-and-versions-in-ci.yml index 69b33ce8..d3709c99 100644 --- a/.github/workflows/update-nixpkgs-and-versions-in-ci.yml +++ b/.github/workflows/update-nixpkgs-and-versions-in-ci.yml @@ -11,7 +11,7 @@ on: jobs: update-nixpkgs: - uses: kachick/anylang-template/.github/workflows/reusable-update-nixpkgs-and-versions-in-ci.yml@2413fce002263e6675ce084da251be0dbbe2a8fc + uses: kachick/selfup/.github/workflows/reusable-bump-flake-lock-and-selfup.yml@action-v1 if: (github.event.sender.login == 'kachick') || (github.event_name != 'pull_request') with: dry-run: ${{ github.event_name == 'pull_request' }}