From 8990094c8497f79190068db99e984b3eec0a6c7c Mon Sep 17 00:00:00 2001 From: Milly Date: Wed, 29 May 2024 22:53:01 +0900 Subject: [PATCH] chore: use `molt-action` in update workflow - `--summary` or `--report` are no longer supported in `@molt/cli`. - `molt-action` is currently at v1-rc and seems to work. --- .github/workflows/update.yml | 43 +++++++----------------------------- 1 file changed, 8 insertions(+), 35 deletions(-) diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 081d3ea..372e416 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -5,44 +5,17 @@ on: - cron: "0 0 * * *" workflow_dispatch: +permissions: + contents: write + pull-requests: write + jobs: update: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v4 - - uses: denoland/setup-deno@v1 - with: - deno-version: 1.x - - name: Configure Git - run: | - git config user.name github-actions[bot] - git config user.email github-actions[bot]@users.noreply.github.com - - name: Update dependencies and commit changes - run: deno task -q update:commit --summary ../title.txt --report ../body.md - - name: Check result - id: result - uses: andstor/file-existence-action@v2 - with: - files: ../title.txt, ../body.md - - name: Read title.txt - id: title - if: steps.result.outputs.files_exists == 'true' - uses: juliangruber/read-file-action@v1 - with: - path: ../title.txt - - name: Read body.md - id: body - if: steps.result.outputs.files_exists == 'true' - uses: juliangruber/read-file-action@v1 - with: - path: ../body.md - - name: Create a pull request - if: steps.result.outputs.files_exists == 'true' - uses: peter-evans/create-pull-request@v6 + + - uses: hasundue/molt-action@v1-rc with: - author: github-actions[bot] - branch: automation/update-dependencies - title: ${{ steps.title.outputs.content }} - body: ${{ steps.body.outputs.content }} - labels: automation - delete-branch: true + source: deno.jsonc