Skip to content

Commit 332cde0

Browse files
committed
Update GHA workflow
1 parent bd55e3a commit 332cde0

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

.github/workflows/build-container.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ jobs:
3232
- name: Checkout repository
3333
uses: actions/checkout@v4
3434

35+
- name: Set up .NET
36+
uses: actions/setup-dotnet@v4
37+
with:
38+
dotnet-version: '9.x'
39+
3540
- name: Pull the latest metadata.json
3641
if: inputs.image_name == 'awesome-copilot'
3742
shell: bash
@@ -81,6 +86,14 @@ jobs:
8186
git push origin main
8287
fi
8388
89+
- name: Build app
90+
if: env.BUILD_IMAGE == 'true' || inputs.force == true
91+
shell: bash
92+
run: |
93+
pushd ${{ inputs.image_name }}
94+
dotnet restore && dotnet build
95+
popd
96+
8497
- name: Check if Dockerfile exists
8598
if: env.BUILD_IMAGE == 'true' || inputs.force == true
8699
id: check-dockerfile
@@ -126,7 +139,7 @@ jobs:
126139
with:
127140
platforms: linux/amd64,linux/arm64
128141
push: true
129-
context: ${{ github.workspace }}/${{ inputs.image_name }}
142+
context: ${{ github.workspace }}
130143
file: ${{ github.workspace }}/Dockerfile.${{ inputs.image_name }}
131144
tags: '${{ steps.meta.outputs.tags }},${{ env.REGISTRY }}/${{ env.REPOSITORY }}/${{ inputs.image_name }}:latest'
132145
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)