-
Notifications
You must be signed in to change notification settings - Fork 60
65 lines (65 loc) · 1.93 KB
/
docker.yaml
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
name: Docker Build
'on':
workflow_dispatch: {}
push: {}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: '0'
- name: Set up DotNET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.402
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_SAMPLES_USERNAME }}
password: ${{ secrets.DOCKERHUB_SAMPLES_PASSWORD }}
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: 5.x
- id: determine_version
name: Determine Version
uses: gittools/actions/gitversion/[email protected]
with:
additionalArguments: /overrideconfig mode=Mainline
- name: Install Octopus Deploy CLI
uses: OctopusDeploy/[email protected]
with:
version: latest
- name: Install Dependencies
run: dotnet restore
shell: bash
- name: Test
run: dotnet test -l:trx
shell: bash
- if: always()
name: Report
uses: dorny/test-reporter@v1
with:
name: DotNET Tests
path: '**/*.trx'
reporter: dotnet-trx
fail-on-error: 'false'
- name: Build and push
uses: docker/build-push-action@v3
with:
context: RandomQuotes
push: true
tags: octopussamples/randomquotes:${{ steps.determine_version.outputs.semVer }}
- name: Create Octopus Release
uses: OctopusDeploy/[email protected]
with:
api_key: ${{ secrets.OCTOPUS_API_TOKEN }}
project: Random Quotes
server: ${{ secrets.OCTOPUS_SERVER_URL }}
deploy_to: Dev
packages: Deploy container to Kubernetes:randomquotes:${{ steps.determine_version.outputs.semVer }}