From 7f1093dc51c0de5cc4ee92fda43b2d83e7dfa850 Mon Sep 17 00:00:00 2001 From: Misite Bao Date: Fri, 7 Apr 2023 16:19:14 +0800 Subject: [PATCH] chore: update auto workflows (#2555) * chore: update workflows * chore: update Taskfile * chore: add lable to auto-sync pr --- .../{contributors.yml => generate-contributors.yml} | 2 +- .github/workflows/label-sponsors.yml | 10 ++++++---- .github/workflows/push.yml | 6 +++--- .github/workflows/sync-translated-documents.yml | 9 +++++---- Taskfile.yaml | 10 +++++----- 5 files changed, 20 insertions(+), 17 deletions(-) rename .github/workflows/{contributors.yml => generate-contributors.yml} (94%) diff --git a/.github/workflows/contributors.yml b/.github/workflows/generate-contributors.yml similarity index 94% rename from .github/workflows/contributors.yml rename to .github/workflows/generate-contributors.yml index 6556280db..a6db2bdb0 100644 --- a/.github/workflows/contributors.yml +++ b/.github/workflows/generate-contributors.yml @@ -26,5 +26,5 @@ jobs: add-paths: "website/static/img/contributors.svg" title: Update Contributors Image body: Generated new image - branch: update-contributors + branch: chore/update-contributors delete-branch: true diff --git a/.github/workflows/label-sponsors.yml b/.github/workflows/label-sponsors.yml index 28bda63b8..0935525b8 100644 --- a/.github/workflows/label-sponsors.yml +++ b/.github/workflows/label-sponsors.yml @@ -1,9 +1,9 @@ -name: Label sponsors +name: Label Sponsors on: pull_request: - types: [ opened ] + types: [opened] issues: - types: [ opened ] + types: [opened] jobs: build: name: is-sponsor-label @@ -11,5 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: JasonEtco/is-sponsor-label-action@v1 + with: + label: Sponsor ❤️ env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index d5382f3c3..ca4bcfe83 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -13,8 +13,8 @@ jobs: - uses: actions/checkout@v2 - name: Verify Changed files - uses: tj-actions/verify-changed-files@v11.1 - id: verify-changed-files + id: changed-files + uses: tj-actions/changed-files@v35 with: files: | website/**/*.mdx @@ -27,7 +27,7 @@ jobs: node-version: 16.x - name: Push files - if: steps.verify-changed-files.outputs.files_changed == 'true' + if: steps.changed-files.outputs.any_changed == 'true' env: CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} run: | diff --git a/.github/workflows/sync-translated-documents.yml b/.github/workflows/sync-translated-documents.yml index 5a8cd109a..764633ff6 100644 --- a/.github/workflows/sync-translated-documents.yml +++ b/.github/workflows/sync-translated-documents.yml @@ -1,4 +1,4 @@ -name: Sync Translated Documents +name: Sync Translations on: workflow_dispatch: @@ -23,9 +23,10 @@ jobs: - name: Create Pull Request uses: peter-evans/create-pull-request@v4 with: - commit-message: "docs: sync documents" - title: "docs: sync documents" + commit-message: "docs: sync translations" + title: "docs: sync translations" body: "- [x] Sync translated documents" - branch: feature/documents + branch: chore/sync-translations + labels: translation delete-branch: true draft: true diff --git a/Taskfile.yaml b/Taskfile.yaml index c7246260d..f397371c3 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -1,24 +1,24 @@ # https://taskfile.dev -version: '3' +version: "3" vars: GREETING: Hello, World! tasks: - check-contributors: + contributors:check: cmds: - npx -y all-contributors-cli check - update-contributors: + contributors:update: cmds: - go run v3/tasks/contribs/main.go - build-contributors: + contributors:build: cmds: - npx -y all-contributors-cli generate release: dir: v2/tools/release cmds: - - go run release.go \ No newline at end of file + - go run release.go