From 7e39b9e0bcf37b50a9d8dd77faac5834fea7ff6a Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 23 Dec 2023 05:07:17 +0000 Subject: [PATCH] autogen: updated common files in HiromiShikata --- .github/workflows/create-pr.yml | 10 ++++----- .github/workflows/empty-format-test-job.yml | 23 +++++++++++++++------ 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/.github/workflows/create-pr.yml b/.github/workflows/create-pr.yml index 8e97978..e38d368 100644 --- a/.github/workflows/create-pr.yml +++ b/.github/workflows/create-pr.yml @@ -21,10 +21,10 @@ jobs: uses: repo-sync/pull-request@v2 with: github_token: ${{ secrets.GH_TOKEN }} - destination_branch: 'main' - source_branch: '' - pr_title: '${{ steps.branch_name.outputs.branch }}' - pr_body: 'This is an auto-create PR.' + destination_branch: "main" + source_branch: "" + pr_title: "${{ steps.branch_name.outputs.branch }}" + pr_body: "This is an auto-create PR." draft: false - name: Assign PR to author @@ -40,7 +40,7 @@ jobs: if: steps.create_pr.outputs.pr_number id: get_pr_id run: | - PR_DATA=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/${{ github.repository }}/pulls/${{ steps.create_pr.outputs.pr_number }}") + PR_DATA=$(curl -s -H "Authorization: token ${{ secrets.GH_TOKEN }}" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/${{ github.repository }}/pulls/${{ steps.create_pr.outputs.pr_number }}") PR_ID=$(echo "$PR_DATA" | jq -r '.node_id') echo "::set-output name=node_id::$PR_ID" diff --git a/.github/workflows/empty-format-test-job.yml b/.github/workflows/empty-format-test-job.yml index 7955c06..c6005d0 100644 --- a/.github/workflows/empty-format-test-job.yml +++ b/.github/workflows/empty-format-test-job.yml @@ -1,15 +1,26 @@ name: Empty format test -on: - push +on: push jobs: - format: - runs-on: ubuntu-latest - steps: - - run: echo "format" test: runs-on: ubuntu-latest steps: - run: echo "test" + format: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + with: + token: ${{ secrets.GH_TOKEN }} + - uses: actions/setup-node@v4 + with: + node-version: 20 + - run: git pull + - run: npx prettier --write "**/*.{md,yaml,yml}" && git --no-pager diff + - uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: 'style: re-format / npx prettier --write "**/*.{md,yaml,yml}"'