Skip to content

chore(deps): new maintainer for ngx-toastr #440

chore(deps): new maintainer for ngx-toastr

chore(deps): new maintainer for ngx-toastr #440

Workflow file for this run

name: Azure Release
on:
workflow_dispatch: {}
push:
branches:
- main
paths:
- BHS.slnx
- src/**
- tests/**
- yarn.lock
permissions: {}
env:
WEB_SRC_PATH: src/BHS.Web
WEB_PUBLISH_PATH: artifacts/publish/BHS.Web/release
CLIENTAPP_PATH: ./src/bhs-web-angular-app
DOTNET_BUILD_CONFIGURATION: Release
DOTNET_CORE_VERSION: 10.0.x
NODE_VERSION: '24'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Run actions/checkout with fetch-depth 0
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Setup .NET
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
dotnet-version: ${{ env.DOTNET_CORE_VERSION }}
- name: Setup GitVersion
uses: gittools/actions/gitversion/setup@51d325634925d7d9ce0a7efc2c586c0bc2b9eee6 # v3.2.1
with:
versionSpec: '5.x'
- run: corepack enable
- name: Setup Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: ${{ env.NODE_VERSION }}
- name: Run gitversion
id: gitversion
uses: gittools/actions/gitversion/execute@51d325634925d7d9ce0a7efc2c586c0bc2b9eee6 # v3.2.1
with:
useConfigFile: true
- name: Add gitversion to summary
run: |
{
echo "### GitVersion"
echo ""
echo "- SEMANTIC_VERSION: ${STEPS_GITVERSION_OUTPUTS_FULLSEMVER}"
echo "- INFORMATIONAL_VERSION: ${STEPS_GITVERSION_OUTPUTS_INFORMATIONALVERSION}"
echo "- COMMIT_DATE: ${STEPS_GITVERSION_OUTPUTS_COMMITDATE}"
} >> "$GITHUB_STEP_SUMMARY"
env:
STEPS_GITVERSION_OUTPUTS_FULLSEMVER: ${{ steps.gitversion.outputs.fullSemVer }}
STEPS_GITVERSION_OUTPUTS_INFORMATIONALVERSION: ${{ steps.gitversion.outputs.informationalVersion }}
STEPS_GITVERSION_OUTPUTS_COMMITDATE: ${{ steps.gitversion.outputs.commitDate }}
- name: Run dotnet restore
run: dotnet restore
- name: Run dotnet build
run: dotnet build --no-restore --configuration ${{ env.DOTNET_BUILD_CONFIGURATION }} -p:Version="${STEPS_GITVERSION_OUTPUTS_FULLSEMVER}" -p:InformationalVersion="${STEPS_GITVERSION_OUTPUTS_INFORMATIONALVERSION}"
env:
STEPS_GITVERSION_OUTPUTS_FULLSEMVER: ${{ steps.gitversion.outputs.fullSemVer }}
STEPS_GITVERSION_OUTPUTS_INFORMATIONALVERSION: ${{ steps.gitversion.outputs.informationalVersion }}
- name: Run dotnet test
run: dotnet test --no-build --configuration ${{ env.DOTNET_BUILD_CONFIGURATION }} --verbosity normal
- run: yarn workspaces focus bhs-generated-models
- run: yarn models:build
- run: yarn workspaces focus bhs-web-angular-app
working-directory: ${{ env.CLIENTAPP_PATH }}
- run: yarn lint
working-directory: ${{ env.CLIENTAPP_PATH }}
- run: yarn transform-release
working-directory: ${{ env.CLIENTAPP_PATH }}
env:
SEMANTIC_VERSION: ${{ steps.gitversion.outputs.fullSemVer }}
INFORMATIONAL_VERSION: ${{ steps.gitversion.outputs.informationalVersion }}
COMMIT_DATE: ${{ steps.gitversion.outputs.commitDate }}
- run: yarn test-ci
working-directory: ${{ env.CLIENTAPP_PATH }}
- name: Run dotnet publish (runs Angular build as part of publish)
run: dotnet publish "${{ env.WEB_SRC_PATH }}" --configuration ${{ env.DOTNET_BUILD_CONFIGURATION }} --no-build
- name: Upload Artifacts
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: webapp
path: ${{ env.WEB_PUBLISH_PATH }}
retention-days: 5
deploy-stage:
if: github.repository_owner == 'JasonWeinzierl'
runs-on: ubuntu-latest
needs: build
environment:
name: staging
url: https://staging.beltonhistoricalsociety.org/
env:
AZURE_WEBAPP_NAME: staging-beltonhistorical
steps:
- name: Download Artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: webapp
path: ${{ env.WEB_PUBLISH_PATH }}
- name: Azure Login
uses: azure/login@f5d393ae46f8fde4be8b75f32e3fc50e654ad0ca # v3.0.1
with:
creds: '{"clientId":"${{ secrets.AZURE_CLIENT_ID }}","clientSecret":"${{ secrets.AZURE_CLIENT_SECRET }}","subscriptionId":"${{ secrets.AZURE_SUBSCRIPTION_ID }}","tenantId":"${{ secrets.AZURE_TENANT_ID }}"}'
- name: Deploy to Azure WebApp
uses: azure/webapps-deploy@02a81bead70021f5284939794bcec79c271ab383 # v3.0.8
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }}
package: ${{ env.WEB_PUBLISH_PATH }}
e2e-test-stage:

Check failure on line 149 in .github/workflows/azure-release.yml

View workflow run for this annotation

GitHub Actions / Azure Release

Invalid workflow file

The workflow is not valid. .github/workflows/azure-release.yml (Line: 149, Col: 3): Error calling workflow 'JasonWeinzierl/BHS.NET/.github/workflows/e2e.yml@890ad6a13f7808ea9326aa7cf564319dd4ab21c6'. The workflow is requesting 'contents: read', but is only allowed 'contents: none'.
needs: deploy-stage
uses: ./.github/workflows/e2e.yml
with:
environment: staging
bail: true
secrets:
CYPRESS_AUTH0_TEST_PASSWORD: ${{ secrets.CYPRESS_AUTH0_TEST_PASSWORD }}
deploy-prod:
if: github.repository_owner == 'JasonWeinzierl'
runs-on: ubuntu-latest
needs:
- build
- e2e-test-stage
environment:
name: production
url: https://beltonhistoricalsociety.org/
env:
AZURE_WEBAPP_NAME: beltonhistorical
steps:
- name: Download Artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: webapp
path: ${{ env.WEB_PUBLISH_PATH }}
- name: Azure Login
uses: azure/login@f5d393ae46f8fde4be8b75f32e3fc50e654ad0ca # v3.0.1
with:
creds: '{"clientId":"${{ secrets.AZURE_CLIENT_ID }}","clientSecret":"${{ secrets.AZURE_CLIENT_SECRET }}","subscriptionId":"${{ secrets.AZURE_SUBSCRIPTION_ID }}","tenantId":"${{ secrets.AZURE_TENANT_ID }}"}'
- name: Deploy to Azure WebApp
uses: azure/webapps-deploy@02a81bead70021f5284939794bcec79c271ab383 # v3.0.8
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }}
package: ${{ env.WEB_PUBLISH_PATH }}
e2e-test-prod:
needs: deploy-prod
uses: ./.github/workflows/e2e.yml
with:
environment: production
bail: true
secrets:
CYPRESS_AUTH0_TEST_PASSWORD: ${{ secrets.CYPRESS_AUTH0_TEST_PASSWORD }}