Update GitHub Actions actions to the latest versions #928
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release - CI | |
on: | |
pull_request: | |
push: | |
paths-ignore: | |
- '**/*.md' | |
- 'mkdocs.yml' | |
- 'src/docs/**/*' | |
tags: | |
- 'v*.*.*' | |
env: | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
DOTNET_CLI_TELEMETRY_OPTOUT: true | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
name: Build, Test, Deploy | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
steps: | |
- name: Get the version | |
id: get_version | |
run: | | |
arrTag=(${GITHUB_REF//\// }) | |
VERSION="${arrTag[2]}" | |
VERSION="${VERSION//v}" | |
echo VERSION:${VERSION} | |
echo ::set-output name=VERSION::${VERSION} | |
shell: bash | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "15" | |
- uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '8.0.x' | |
- name: Set build number | |
if: matrix.os == 'ubuntu-latest' | |
run: echo "BuildNumber=$(( $GITHUB_RUN_NUMBER + 15471 ))" >> $GITHUB_ENV | |
- name: Build | |
run: | | |
dotnet build -c Release -p:Version=${{ steps.get_version.outputs.VERSION }} | |
- name: Unit Tests | |
run: | | |
dotnet test -c Release --no-build ./test/OrchardCore.Tests/OrchardCore.Tests.csproj | |
- name: Functional Tests | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
cd test/OrchardCore.Tests.Functional | |
npm install | |
npm run cms:test | |
npm run mvc:test | |
- uses: actions/upload-artifact@v4 | |
if: matrix.os == 'ubuntu-latest' && failure() | |
with: | |
name: Functional Test failure | |
path: | | |
test/OrchardCore.Tests.Functional/cms-tests/cypress/screenshots | |
src/OrchardCore.Cms.Web/App_Data_Tests/logs | |
- name: Set up Docker Buildx | |
if: matrix.os == 'ubuntu-latest' | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to DockerHub | |
if: matrix.os == 'ubuntu-latest' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} |