forked from opserver/Opserver
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (47 loc) · 1.56 KB
/
workflow_build_and_release_containers.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
name: Build images and create Octopus release
run-name: 'Build images and create release'
on:
workflow_dispatch:
pull_request:
paths-ignore:
- README.md
push:
branches:
- main
paths-ignore:
- README.md
jobs:
generate_date_version:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.date-version.outputs.version }}
steps:
# manually generate version until permissions are sorted
# - name: Generate Date Version
# id: date-version
# uses: StackEng/CoreEngineering.CITools/actions/date_version@v1
- name: Set Version
if: ${{ github.ref_name == 'main' }}
run: |
# Year.Month.Day.HourMinSec (no zero padding in each segment)
VERSION="$(date -u +'%Y.%-m.%-d.%-H%M%S')"
echo "version=$version" >> $env:GITHUB_OUTPUT
echo "generated version: $version"
build_docker:
needs: [generate_date_version]
uses: ./.github/workflows/build_app_docker_image.yml
with:
version: ${{ needs.generate_date_version.outputs.version }}
secrets:
registry_username: ${{ secrets.CLOUDSMITH_API_ACCOUNT }}
registry_password: ${{ secrets.CLOUDSMITH_API_KEY }}
nuget_user: ${{ secrets.CLOUDSMITH_API_ACCOUNT }}
nuget_password: ${{ secrets.CLOUDSMITH_API_KEY }}
build_cnab:
uses: ./.github/workflows/build_cnab.yml
needs: [generate_date_version]
with:
version: ${{ needs.generate_date_version.outputs.version }}
secrets:
registry_username: ${{ secrets.CLOUDSMITH_API_ACCOUNT }}
registry_password: ${{ secrets.CLOUDSMITH_API_KEY }}