Skip to content

Bump dotnet/sdk from 7.0-alpine to 9.0-alpine #2695

Bump dotnet/sdk from 7.0-alpine to 9.0-alpine

Bump dotnet/sdk from 7.0-alpine to 9.0-alpine #2695

Workflow file for this run

name: Run .NET tests and Lint Dockerfile
on:
pull_request:
types: [assigned, opened, synchronize, reopened]
jobs:
test_dot_net:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Azure/login@v2
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Fetch secrets from key vault
uses: azure/CLI@v2
id: fetch-secrets
with:
inlineScript: |
SECRET_VALUE=$(az keyvault secret show --name "SLACK-WEBHOOK" --vault-name "${{ secrets.INFRA_KEY_VAULT}}" --query "value" -o tsv)
echo "::add-mask::$SECRET_VALUE"
echo "SLACK-WEBHOOK=$SECRET_VALUE" >> $GITHUB_OUTPUT
- name: set-up-environment
uses: DFE-Digital/github-actions/set-up-environment@master
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: '7.0'
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore /warnaserror
- name: Spin Up Stack
run: docker compose up -d
- name: Test
run: dotnet test --no-restore --verbosity normal
- name: Lint Dockerfile
uses: brpaz/hadolint-action@master
with:
dockerfile: "Dockerfile"
- name: Slack Notification
if: failure() && github.ref == 'refs/heads/master'
uses: rtCamp/action-slack-notify@master
env:
SLACK_COLOR: ${{env.SLACK_FAILURE }}
SLACK_MESSAGE: Pipeline Failure carrying out job ${{github.job}}
SLACK_TITLE: 'Failure: ${{ github.workflow }}'
SLACK_WEBHOOK: ${{ steps.fetch-secrets.outputs.SLACK-WEBHOOK }}