Skip to content

Commit

Permalink
Update GitHub Actions actions to the latest versions (#15619)
Browse files Browse the repository at this point in the history
Co-authored-by: Zoltán Lehóczky <[email protected]>
  • Loading branch information
MikeAlhayek and Piedone authored Apr 11, 2024
1 parent d19d39d commit 4d89c70
Show file tree
Hide file tree
Showing 11 changed files with 126 additions and 116 deletions.
31 changes: 19 additions & 12 deletions .github/workflows/assets_validation.yml
Original file line number Diff line number Diff line change
@@ -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') }}
Expand All @@ -19,11 +19,18 @@ jobs:
npm install
npm run rebuild
- name: Check if git has changes
id: changes
uses: UnicornGlobal/[email protected]
- 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."
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Monthly Issue and Pull Request Metrics
name: Community Metrics
on:
workflow_dispatch:
schedule:
Expand All @@ -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
Expand All @@ -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"'
Expand All @@ -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'
Expand All @@ -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'
Expand All @@ -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 }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/contributor_map.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
34 changes: 17 additions & 17 deletions .github/workflows/functional_all_db.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Functional Tests - all Databases
on:
# manual trigger
# Manual trigger.
workflow_dispatch:
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
Expand All @@ -13,20 +13,20 @@ 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
run: |
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
Expand All @@ -39,17 +39,17 @@ 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
run: |
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
Expand Down Expand Up @@ -80,17 +80,17 @@ 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
run: |
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
Expand All @@ -117,17 +117,17 @@ 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
run: |
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
Expand All @@ -153,17 +153,17 @@ 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
run: |
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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mac_unit_test_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/main_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pr_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/preview_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/validate_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
Loading

0 comments on commit 4d89c70

Please sign in to comment.