From 3aa3f7e3e305039c672b2179be5bf540cf879462 Mon Sep 17 00:00:00 2001 From: Gilbert Sanchez Date: Thu, 27 Aug 2026 21:21:30 +0000 Subject: [PATCH] Modernize GitHub Actions workflows --- .github/workflows/add-article.yml | 2 +- .github/workflows/add-event.yml | 2 +- .github/workflows/add-user-group.yml | 2 +- .github/workflows/build.yml | 6 +++--- .github/workflows/community-stats.yml | 23 +++++++++++++---------- .github/workflows/meetup-sync.yml | 6 +++--- .github/workflows/podcast-sync.yml | 6 +++--- 7 files changed, 25 insertions(+), 22 deletions(-) diff --git a/.github/workflows/add-article.yml b/.github/workflows/add-article.yml index d1667be23..3546ee2cf 100644 --- a/.github/workflows/add-article.yml +++ b/.github/workflows/add-article.yml @@ -16,7 +16,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Parse issue and create article content file id: parse diff --git a/.github/workflows/add-event.yml b/.github/workflows/add-event.yml index 3c8b4c900..6b7127ad9 100644 --- a/.github/workflows/add-event.yml +++ b/.github/workflows/add-event.yml @@ -16,7 +16,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Parse issue and create event content file id: parse diff --git a/.github/workflows/add-user-group.yml b/.github/workflows/add-user-group.yml index e208bc697..ced466c50 100644 --- a/.github/workflows/add-user-group.yml +++ b/.github/workflows/add-user-group.yml @@ -16,7 +16,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Parse issue and create user group content file id: parse diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 04a1f28e4..879fdcd3a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,15 +18,15 @@ jobs: && sudo dpkg -i ${{ runner.temp }}/hugo.deb - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 with: submodules: recursive fetch-depth: 0 - name: Setup Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v7 with: - node-version: '18' + node-version: '24' - name: Install Node dependencies run: | diff --git a/.github/workflows/community-stats.yml b/.github/workflows/community-stats.yml index 76a918080..1a32fbdc7 100644 --- a/.github/workflows/community-stats.yml +++ b/.github/workflows/community-stats.yml @@ -7,18 +7,19 @@ on: permissions: contents: write + pull-requests: write jobs: update-community: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Setup Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v7 with: - node-version: '18' + node-version: '24' - name: Install dependencies run: npm install node-fetch @@ -26,10 +27,12 @@ jobs: - name: Fetch Discourse activity run: node .github/scripts/fetch-discourse-activity.js - - name: Commit updates - run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - git add data/community_stats.json - git diff --staged --quiet || git commit -m "Update community stats" - git push \ No newline at end of file + - name: Create pull request for updated community stats + uses: peter-evans/create-pull-request@v8.1.1 + with: + add-paths: data/community_stats.json + branch: automation/update-community-stats + commit-message: Update community stats + title: Update community stats + body: Automated update from the PowerShell.org community forum. + delete-branch: true \ No newline at end of file diff --git a/.github/workflows/meetup-sync.yml b/.github/workflows/meetup-sync.yml index e9613d6ce..eb2139536 100644 --- a/.github/workflows/meetup-sync.yml +++ b/.github/workflows/meetup-sync.yml @@ -18,12 +18,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Setup Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v7 with: - node-version: '20' + node-version: '24' - name: Sync upcoming Meetup events run: node .github/scripts/sync-meetup-events.mjs diff --git a/.github/workflows/podcast-sync.yml b/.github/workflows/podcast-sync.yml index 843b35c94..6ab8b73e3 100644 --- a/.github/workflows/podcast-sync.yml +++ b/.github/workflows/podcast-sync.yml @@ -17,12 +17,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Setup Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v7 with: - node-version: '18' + node-version: '24' - name: Install dependencies run: npm install node-fetch