-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expand file tree
/
Copy pathpump-device-integration-server-docker.yml
More file actions
87 lines (75 loc) · 2.29 KB
/
Copy pathpump-device-integration-server-docker.yml
File metadata and controls
87 lines (75 loc) · 2.29 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: Pump Device Integration Server Docker
on:
push:
branches: [ master ]
paths:
- 'samples/PumpDeviceIntegrationServer/**'
- 'src/**'
- 'src/**'
- 'tools/**'
- 'Directory.*.props'
- 'Directory.Build.targets'
- '*.props'
- 'NuGet.config'
- '.github/workflows/pump-device-integration-server-docker.yml'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
REGISTRY: ghcr.io
IMAGE_NAME: pumpdeviceintegrationserver
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Set up .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: '8.x'
- name: Set Version
shell: pwsh
run: ./.azurepipelines/set-version.ps1
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v4
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v4
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Prepare image repository name
run: |
echo IMAGE_REPOSITORY=$(echo ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v6
with:
images: ${{ env.IMAGE_REPOSITORY }}
tags: |
type=raw,value=latest
type=raw,value=${{ env.NBGV_Version }}${{ env.NBGV_PrereleaseVersion }}
type=sha
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v7
with:
context: .
file: ./samples/PumpDeviceIntegrationServer/Dockerfile
build-args: |
Version=${{ env.NBGV_Version }}
SimpleVersion=${{ env.NBGV_SimpleVersion }}
InformationalVersion=${{ env.NBGV_AssemblyInformationalVersion }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64
provenance: false
cache-from: type=gha
cache-to: type=gha,mode=max