Skip to content

Feature/GitHub monitor cicd #5

Feature/GitHub monitor cicd

Feature/GitHub monitor cicd #5

name: Build AHK.GradeManagement.QueueFunction
on:
pull_request:
branches: dev # Run workflow on PRs to the main branch.
# Run workflow on pushes to any branch, except the main branch.
# push:
# branches-ignore: dev
# Allows you to run this workflow manually from the Actions tab.
workflow_dispatch:
# 👇 Allows this workflow to be called from the deployment workflow, but the parameters must be provided.
workflow_call:
inputs:
artifactName:
description: The name of the artifact to upload to.
required: true
type: string
env:
# 👇 Provide a default artifact name for when this workflow is not called by the deployment workflow.
artifactName: ${{ inputs.artifactName || 'buildArtifact' }}
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout the repo source code
uses: actions/checkout@v3
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: "9.0.x"
- name: "Run dotnet restore"
working-directory: src/Ahk.GradeManagement
run: dotnet restore Ahk.GradeManagement.sln
- name: "Run dotnet publish"
working-directory: src/Ahk.GradeManagement
run: dotnet publish Ahk.GradeManagement.QueueFunction/Ahk.GradeManagement.QueueFunction.csproj --no-restore --configuration Release --output '${{ github.workspace }}/output/Ahk.GradeManagement.QueueFunction'
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.artifactName }}
path: ./output # Put the path to the build artifact files directory here.