From 885a5673f7d16d9f35ed14d1d9eeef6fa8288f2e Mon Sep 17 00:00:00 2001 From: Tw93 Date: Fri, 22 Aug 2025 18:03:29 +0800 Subject: [PATCH] :art: update workflow --- .github/workflows/release.yml | 40 ------------------ .github/workflows/update-contributors.yml | 49 +++++++++++++++++++++++ 2 files changed, 49 insertions(+), 40 deletions(-) create mode 100644 .github/workflows/update-contributors.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bd3c18c..6a4ede0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,46 +20,6 @@ env: IMAGE_NAME: ${{ github.repository }} jobs: - # Update contributor list - update-contributors: - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') - runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: write - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - token: ${{ secrets.GITHUB_TOKEN }} - fetch-depth: 0 - - - name: Update Contributors in README.md - uses: akhilmhdh/contributors-readme-action@v2.3.11 - with: - image_size: 90 - columns_per_row: 7 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Update Contributors in README_CN.md - uses: akhilmhdh/contributors-readme-action@v2.3.11 - with: - image_size: 90 - columns_per_row: 7 - readme_path: README_CN.md - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Update Contributors in README_JP.md - uses: akhilmhdh/contributors-readme-action@v2.3.11 - with: - image_size: 90 - columns_per_row: 7 - readme_path: README_JP.md - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # Build and release popular apps release-apps: if: | diff --git a/.github/workflows/update-contributors.yml b/.github/workflows/update-contributors.yml new file mode 100644 index 0000000..db282a4 --- /dev/null +++ b/.github/workflows/update-contributors.yml @@ -0,0 +1,49 @@ +name: Update Contributors + +on: + push: + branches: [main, dev] + schedule: + - cron: '0 0 * * 0' # Every Sunday at midnight UTC + +jobs: + update-contributors: + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + fetch-depth: 0 + + - name: Update Contributors in README.md + uses: akhilmhdh/contributors-readme-action@v2.3.11 + with: + image_size: 90 + columns_per_row: 7 + auto_detect_branch_protection: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Update Contributors in README_CN.md + uses: akhilmhdh/contributors-readme-action@v2.3.11 + with: + image_size: 90 + columns_per_row: 7 + readme_path: README_CN.md + auto_detect_branch_protection: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Update Contributors in README_JP.md + uses: akhilmhdh/contributors-readme-action@v2.3.11 + with: + image_size: 90 + columns_per_row: 7 + readme_path: README_JP.md + auto_detect_branch_protection: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file