From 4d89c701ca0afcb21825c4e2dec0cb4e8d6480b0 Mon Sep 17 00:00:00 2001 From: Mike Alhayek Date: Thu, 11 Apr 2024 10:50:30 -0700 Subject: [PATCH] Update GitHub Actions actions to the latest versions (#15619) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Zoltán Lehóczky --- .github/workflows/assets_validation.yml | 31 +++-- ...ssue-metrics.yml => community_metrics.yml} | 14 +- .github/workflows/contributor_map.yml | 3 +- .github/workflows/functional_all_db.yml | 34 ++--- .github/workflows/mac_unit_test_ci.yml | 2 +- .github/workflows/main_ci.yml | 8 +- .github/workflows/pr_ci.yml | 8 +- .github/workflows/preview_ci.yml | 6 +- .github/workflows/release_ci.yml | 10 +- .github/workflows/validate_pr.yml | 4 +- .../contributors/images/contributors-map.svg | 122 +++++++++--------- 11 files changed, 126 insertions(+), 116 deletions(-) rename .github/workflows/{issue-metrics.yml => community_metrics.yml} (90%) diff --git a/.github/workflows/assets_validation.yml b/.github/workflows/assets_validation.yml index 82d83907f26..709311002f9 100644 --- a/.github/workflows/assets_validation.yml +++ b/.github/workflows/assets_validation.yml @@ -1,14 +1,14 @@ -name: Frontend Assets build validation +name: Frontend Assets Build Validation on: -# manual trigger + # Manual trigger. workflow_dispatch: jobs: test-npm-build: name: Test building assets runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/cache@v3 + - uses: actions/checkout@v4 + - uses: actions/cache@v4 with: path: ~/.npm key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} @@ -19,11 +19,18 @@ jobs: npm install npm run rebuild - name: Check if git has changes - id: changes - uses: UnicornGlobal/has-changes-action@v1.0.11 - - name: Changes detected after building assets - if: steps.changes.outputs.changed == 1 - run: | - git status - echo "Please make sure to build them properly before pushing" - exit -1 + shell: pwsh + run: | + $changes = git status --porcelain + + if ($changes) + { + Write-Output 'Please make sure to build the assets properly before pushing, see https://docs.orchardcore.net/en/latest/docs/guides/gulp-pipeline/.' + Write-Output 'The following files changed:' + Write-Output $changes + exit -1 + } + else + { + Write-Host "No uncommitted changes found. Repository is clean." + } diff --git a/.github/workflows/issue-metrics.yml b/.github/workflows/community_metrics.yml similarity index 90% rename from .github/workflows/issue-metrics.yml rename to .github/workflows/community_metrics.yml index 1ae7decc860..0e010ddbf32 100644 --- a/.github/workflows/issue-metrics.yml +++ b/.github/workflows/community_metrics.yml @@ -1,4 +1,4 @@ -name: Monthly Issue and Pull Request Metrics +name: Community Metrics on: workflow_dispatch: schedule: @@ -11,7 +11,7 @@ permissions: jobs: build: - name: Generate Issue and Pull Request Metrics + name: Generate Community Metrics runs-on: ubuntu-latest steps: - name: Get Dates For Last Month @@ -28,7 +28,7 @@ jobs: Write-Output "LAST_MONTH=$firstDay..$lastDay" >> $env:GITHUB_ENV - name: Compute Issue Metrics - uses: github/issue-metrics@v2 + uses: github/issue-metrics@v3 env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} SEARCH_QUERY: 'repo:OrchardCMS/OrchardCore is:issue created:${{ env.LAST_MONTH }} -reason:"not planned" -label:"community metrics"' @@ -41,7 +41,7 @@ jobs: Add-Content -Path ./community_metrics.md -Value (Get-Content -Path ./issue_metrics.md -Raw) - name: Compute Pull Request Metrics - uses: github/issue-metrics@v2 + uses: github/issue-metrics@v3 env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} SEARCH_QUERY: 'repo:OrchardCMS/OrchardCore is:pr created:${{ env.LAST_MONTH }} -label:dontmerge -label:notready -is:draft' @@ -54,7 +54,7 @@ jobs: Add-Content -Path ./community_metrics.md -Value ([Environment]::NewLine + $content) - name: Compute Q&A Discussion Request Metrics - uses: github/issue-metrics@v2 + uses: github/issue-metrics@v3 env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} SEARCH_QUERY: 'repo:OrchardCMS/OrchardCore type:discussions created:${{ env.LAST_MONTH }} category:Q&A' @@ -72,8 +72,8 @@ jobs: Get-Content ./community_metrics.md >> $env:GITHUB_STEP_SUMMARY - name: Create Issue - # v4.0.1 - uses: peter-evans/create-issue-from-file@433e51abf769039ee20ba1293a088ca19d573b7f + # v5.0.0 + uses: peter-evans/create-issue-from-file@24452a72d85239eacf1468b0f1982a9f3fec4c94 with: title: Monthly community metrics report for ${{ env.LAST_MONTH }} token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/contributor_map.yml b/.github/workflows/contributor_map.yml index 88fa1ec0736..fb6a6a91d91 100644 --- a/.github/workflows/contributor_map.yml +++ b/.github/workflows/contributor_map.yml @@ -13,6 +13,7 @@ jobs: steps: - name: Update Contributor Map - uses: tunaitis/contributor-map@da8a84b848781bccaa56bc73519c055f4814e512 #v1 + # v1.1 + uses: tunaitis/contributor-map@bf97d201f9b59abe463fa4ef3b5c4478d22f606d with: output: src/docs/community/contributors/images/contributors-map.svg diff --git a/.github/workflows/functional_all_db.yml b/.github/workflows/functional_all_db.yml index a3a5ee9e7f6..15614fc8bed 100644 --- a/.github/workflows/functional_all_db.yml +++ b/.github/workflows/functional_all_db.yml @@ -1,6 +1,6 @@ name: Functional Tests - all Databases on: - # manual trigger + # Manual trigger. workflow_dispatch: env: DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true @@ -13,12 +13,12 @@ jobs: container: image: cypress/included:9.6.1 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # We need to install dotnet in the docker container. - - uses: actions/setup-dotnet@v3 + - uses: actions/setup-dotnet@v4 with: dotnet-version: '8.0.x' - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: "15" - name: Functional Tests @@ -26,7 +26,7 @@ jobs: cd test/OrchardCore.Tests.Functional npm install npm run mvc:test - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 if: failure() with: name: functional-mvc-screenshots @@ -39,9 +39,9 @@ jobs: container: image: cypress/included:9.6.1 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # We need to install dotnet in the docker container. - - uses: actions/setup-dotnet@v3 + - uses: actions/setup-dotnet@v4 with: dotnet-version: '8.0.x' - name: Functional Tests @@ -49,7 +49,7 @@ jobs: cd test/OrchardCore.Tests.Functional npm install npm run cms:test - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 if: failure() with: name: functional-cms-sqlite-failure @@ -80,9 +80,9 @@ jobs: OrchardCore__ConnectionString: "User ID=postgres;Password=admin;Host=postgres;Port=5432;Database=app;" OrchardCore__DatabaseProvider: "Postgres" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # We need to install dotnet in the docker container. - - uses: actions/setup-dotnet@v3 + - uses: actions/setup-dotnet@v4 with: dotnet-version: '8.0.x' - name: Functional Tests @@ -90,7 +90,7 @@ jobs: cd test/OrchardCore.Tests.Functional npm install npm run cms:test - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 if: failure() with: name: functional-cms-postgresql-failure @@ -117,9 +117,9 @@ jobs: OrchardCore__ConnectionString: "server=mysql;uid=root;pwd=test123;database=test" OrchardCore__DatabaseProvider: "MySql" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # We need to install dotnet in the docker container. - - uses: actions/setup-dotnet@v3 + - uses: actions/setup-dotnet@v4 with: dotnet-version: '8.0.x' - name: Functional Tests @@ -127,7 +127,7 @@ jobs: cd test/OrchardCore.Tests.Functional npm install npm run cms:test - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 if: failure() with: name: functional-cms-mysql-failure @@ -153,9 +153,9 @@ jobs: OrchardCore__ConnectionString: "Server=mssql;Database=tempdb;User Id=sa;Password=Password12!;Encrypt=False" OrchardCore__DatabaseProvider: "SqlConnection" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # We need to install dotnet in the docker container. - - uses: actions/setup-dotnet@v3 + - uses: actions/setup-dotnet@v4 with: dotnet-version: '8.0.x' - name: Functional Tests @@ -163,7 +163,7 @@ jobs: cd test/OrchardCore.Tests.Functional npm install npm run cms:test - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 if: failure() with: name: functional-cms-mssql-failure diff --git a/.github/workflows/mac_unit_test_ci.yml b/.github/workflows/mac_unit_test_ci.yml index cb5a8e63b21..71e5c3c40ad 100644 --- a/.github/workflows/mac_unit_test_ci.yml +++ b/.github/workflows/mac_unit_test_ci.yml @@ -10,7 +10,7 @@ jobs: runs-on: macos-latest name: Unit Tests steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Build and test run: | dotnet build -c Release diff --git a/.github/workflows/main_ci.yml b/.github/workflows/main_ci.yml index ca8bc847223..26af91e7515 100644 --- a/.github/workflows/main_ci.yml +++ b/.github/workflows/main_ci.yml @@ -18,11 +18,11 @@ jobs: matrix: os: [ubuntu-latest, windows-latest] steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: "15" - - uses: actions/setup-dotnet@v3 + - uses: actions/setup-dotnet@v4 with: dotnet-version: '8.0.x' - name: Build @@ -38,7 +38,7 @@ jobs: npm install npm run cms:test npm run mvc:test - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 if: matrix.os == 'ubuntu-latest' && failure() with: name: Functional Test failure diff --git a/.github/workflows/pr_ci.yml b/.github/workflows/pr_ci.yml index 7dcde8681af..be7f5702dc0 100644 --- a/.github/workflows/pr_ci.yml +++ b/.github/workflows/pr_ci.yml @@ -17,11 +17,11 @@ jobs: os: [ubuntu-latest, windows-latest] name: Build & Test steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: "15" - - uses: actions/setup-dotnet@v3 + - uses: actions/setup-dotnet@v4 with: dotnet-version: '8.0.x' - name: Build @@ -37,7 +37,7 @@ jobs: npm install npm run cms:test npm run mvc:test - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 if: matrix.os == 'ubuntu-latest' && failure() with: name: functional-test-failure diff --git a/.github/workflows/preview_ci.yml b/.github/workflows/preview_ci.yml index fe25acb75b8..fbfa1d9b46d 100644 --- a/.github/workflows/preview_ci.yml +++ b/.github/workflows/preview_ci.yml @@ -21,11 +21,11 @@ jobs: Write-Output "Commits found in the last 24 hours: $hasCommitFromLastDay." $shouldPublish = $hasCommitFromLastDay -and '${{ github.event_name }}' -eq 'schedule' "should-publish=$($shouldPublish ? 'true' : 'false')" >> $Env:GITHUB_OUTPUT - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 if: steps.check-publish.outputs.should-publish == 'true' with: node-version: "15" - - uses: actions/setup-dotnet@v3 + - uses: actions/setup-dotnet@v4 if: steps.check-publish.outputs.should-publish == 'true' with: dotnet-version: '8.0.x' @@ -47,7 +47,7 @@ jobs: npm install npm run cms:test npm run mvc:test - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 if: failure() with: name: Functional Test failure diff --git a/.github/workflows/release_ci.yml b/.github/workflows/release_ci.yml index 3d3d1c312e3..095376e81cb 100644 --- a/.github/workflows/release_ci.yml +++ b/.github/workflows/release_ci.yml @@ -27,13 +27,13 @@ jobs: VERSION="${arrTag[2]}" VERSION="${VERSION//v}" echo VERSION:${VERSION} - echo ::set-output name=VERSION::${VERSION} + echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT shell: bash - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: "15" - - uses: actions/setup-dotnet@v3 + - uses: actions/setup-dotnet@v4 with: dotnet-version: '8.0.x' - name: Set build number @@ -52,7 +52,7 @@ jobs: npm install npm run cms:test npm run mvc:test - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 if: matrix.os == 'ubuntu-latest' && failure() with: name: Functional Test failure diff --git a/.github/workflows/validate_pr.yml b/.github/workflows/validate_pr.yml index 85ed3f9c2a5..b652b6700bc 100644 --- a/.github/workflows/validate_pr.yml +++ b/.github/workflows/validate_pr.yml @@ -12,8 +12,8 @@ jobs: timeout-minutes: 3 steps: - name: Check for Merge Conflict in PR - # releases/2.1.0 - uses: eps1lon/actions-label-merge-conflict@92924ba33a60e436034b0ac3838de523bf7df071 + # v3.0.0 + uses: eps1lon/actions-label-merge-conflict@e62d7a53ff8be8b97684bffb6cfbbf3fc1115e2e with: repoToken: ${{ secrets.GITHUB_TOKEN }} commentOnDirty: "This pull request has merge conflicts. Please resolve those before requesting a review." diff --git a/src/docs/community/contributors/images/contributors-map.svg b/src/docs/community/contributors/images/contributors-map.svg index ad878a56794..813d7948a84 100644 --- a/src/docs/community/contributors/images/contributors-map.svg +++ b/src/docs/community/contributors/images/contributors-map.svg @@ -206,47 +206,49 @@ .palette-color-4 { fill: #6AB356 !important; } .palette-color-5 { fill: #47A042 !important; } .palette-color-6 { fill: #328533 !important; } - .ru { fill: #D9E887; } - .im { fill: #D9E887; } + .palette-color-7 { fill: #1D6A23 !important; } + .cz { fill: #D9E887; } + .tr { fill: #D9E887; } .bg { fill: #D9E887; } - .dk { fill: #D9E887; } .vn { fill: #D9E887; } + .dk { fill: #D9E887; } .ee { fill: #D9E887; } - .ro { fill: #D9E887; } - .tr { fill: #D9E887; } .ba { fill: #D9E887; } - .cy { fill: #D9E887; } .no { fill: #D9E887; } + .im { fill: #D9E887; } .sg { fill: #D9E887; } - .pk { fill: #B3D778; } - .za { fill: #B3D778; } - .jp { fill: #B3D778; } + .ru { fill: #D9E887; } + .cy { fill: #D9E887; } + .ro { fill: #D9E887; } .in { fill: #B3D778; } - .it { fill: #B3D778; } + .es { fill: #B3D778; } .ua { fill: #B3D778; } + .ch { fill: #B3D778; } .at { fill: #B3D778; } .pl { fill: #B3D778; } - .ch { fill: #B3D778; } + .jp { fill: #B3D778; } + .it { fill: #B3D778; } .rs { fill: #B3D778; } - .es { fill: #B3D778; } - .th { fill: #8CC569; } + .pk { fill: #B3D778; } + .za { fill: #B3D778; } .tn { fill: #8CC569; } - .de { fill: #8CC569; } .pt { fill: #8CC569; } - .nz { fill: #8CC569; } - .se { fill: #6AB356; } + .de { fill: #8CC569; } + .th { fill: #8CC569; } + .fi { fill: #6AB356; } .be { fill: #6AB356; } + .se { fill: #6AB356; } .nl { fill: #6AB356; } - .fi { fill: #6AB356; } + .nz { fill: #47A042; } + .hu { fill: #47A042; } .cn { fill: #47A042; } .au { fill: #47A042; } - .ca { fill: #47A042; } - .hu { fill: #47A042; } .us { fill: #328533; } .gb { fill: #328533; } - .fr { fill: #328533; } .ye { fill: #328533; } -#legend6 { display: inline !important; } + .ca { fill: #328533; } + .fr { fill: #1D6A23; } +#legend7 { display: inline !important; } Yemen (490 contributions) + id="title6380">Yemen (537 contributions) New Zealand (17 contributions) + id="title6637">New Zealand (407 contributions) Germany (17 contributions) + id="title6700">Germany (18 contributions) Czech Republic<!-- cz_contributions --> + id="title6991">Czech Republic (1 contributions) Finland (18 contributions) + id="title7000">Finland (21 contributions) United Kingdom (948 contributions) + id="title7077">United Kingdom (558 contributions) Hungary (102 contributions) + id="title7845">Hungary (112 contributions) United States of America (1558 contributions) + id="foo">United States of America (1613 contributions) China (38 contributions) + id="title8623">China (48 contributions) France (2794 contributions) + id="title8670">France (2809 contributions) %8 + y="1542.405">2.8k 2.7k + y="1542.8457">2.8k 490 + y="1542.4438">432 38 + y="1542.4438">48 18 + y="1542.8457">20 %8 + y="1542.405">2.8k 2.7k + y="1542.8457">2.8k 490 + y="1542.4438">432 38 + y="1542.4438">48 18 + y="1542.8457">20 %8 + y="1542.405">2.8k 2.7k + y="1542.8457">2.8k 490 + y="1542.4438">432 38 + y="1542.4438">48 18 + y="1542.8457">20 2.7k + y="1542.8457">2.8k 490 + y="1542.4438">432 38 + y="1542.4438">48 18 + y="1542.8457">20 %8 + y="1542.444">2.8k 490 + y="1542.4438">432 38 + y="1542.4438">48 18 + y="1542.8457">20 2.7k + y="1542.444">2.8k 18 + y="1542.8457">20 490 + y="1542.444">432 18 + y="1542.8457">20 38 + y="1542.444">48 18 + y="1542.444">20