-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (49 loc) · 1.51 KB
/
Copy pathrelease.yml
File metadata and controls
59 lines (49 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
tag:
description: 'Image tag to publish (e.g. v0.1.0)'
required: true
type: string
permissions:
contents: read
packages: write
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false
jobs:
publish-host-image:
name: Publish Host container image
runs-on: ubuntu-latest
timeout-minutes: 30
env:
IMAGE_TAG: ${{ inputs.tag || github.ref_name }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.x
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Resolve image namespace
id: namespace
run: echo "namespace=$(echo '${{ github.repository_owner }}' | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT"
- name: Publish multi-arch image to GHCR
run: >
dotnet publish src/Dataverse.Emulator.Host/Dataverse.Emulator.Host.csproj
-c Release
-t:PublishContainer
-p:ContainerRegistry=ghcr.io
-p:ContainerRepository=${{ steps.namespace.outputs.namespace }}/dataverse-emulator-host
'-p:ContainerImageTags="${{ env.IMAGE_TAG }};latest"'
'-p:ContainerRuntimeIdentifiers="linux-x64;linux-arm64"'