forked from OctopusDeploy/WorkerTools
-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (66 loc) · 2.31 KB
/
build.yml
File metadata and controls
76 lines (66 loc) · 2.31 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
name: Build & Test
on:
push:
branches:
- '**' # matches every branch
paths:
- "**"
- "!.octopus/**"
- "!.github/ISSUE_TEMPLATE/**"
- "!.github/workflows/update-dependencies.yml"
workflow_dispatch:
env:
OCTOPUS_API_KEY: ${{ secrets.OCTOPUS_API_KEY }}
OCTOPUS_URL: ${{ secrets.OCTOPUS_SERVER_URL }}
OCTOPUS_SPACE: 'Recruit Wizard'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.WizardsoftGitHubToken }}
fetch-depth: 0
submodules: 'recursive'
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.10.2
with:
versionSpec: '5.x'
- name: Display GitVersion config
id: gitversion
uses: gittools/actions/gitversion/execute@v0.10.2
with:
useConfigFile: true
configFilePath: GitVersion.yml
additionalArguments: "/updateprojectfiles"
- name: Display GitVersion outputs
run: |
echo "AssemblySemFileVer: ${{ steps.gitversion.outputs.assemblySemFileVer }}"
echo "AssemblySemVer: ${{ steps.gitversion.outputs.assemblySemVer }}"
echo "FullSemVer: ${{ steps.gitversion.outputs.fullSemVer }}"
echo "InformationalVersion: ${{ steps.gitversion.outputs.informationalVersion }}"
- name: Login to Azure Container Registry
uses: docker/login-action@v3
with:
registry: ${{ secrets.DOCKER_SERVER_URL }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build & Push
uses: docker/build-push-action@v5
with:
context: ubuntu.22.04
push: true
build-args: |
version=${{ steps.gitversion.outputs.fullSemVer }}
tags: ${{ secrets.DOCKER_SERVER_URL }}/sql-worker-tools:${{ steps.gitversion.outputs.fullSemVer }}
- name: Build & Push
uses: docker/build-push-action@v5
if: github.ref == 'refs/heads/main'
with:
context: ubuntu.22.04
push: true
build-args: |
version=${{ steps.gitversion.outputs.fullSemVer }}
tags: ${{ secrets.DOCKER_SERVER_URL }}/sql-worker-tools:latest