-
Notifications
You must be signed in to change notification settings - Fork 34
81 lines (74 loc) · 2.09 KB
/
beta--lint-unit-build-and-publish-images.yml
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
name: Beta QA
on:
push:
branches:
- beta
jobs:
calculate-version:
runs-on: ubuntu-latest
outputs:
semVer: ${{ steps.gitversion.outputs.semVer }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
branches: main
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: "5.x"
- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/[email protected]
with:
useConfigFile: true
assign-semver:
runs-on: ubuntu-latest
needs: [calculate-version]
env:
SEMVER: ${{ needs.calculate-version.outputs.semVer }}
MAJOR: ${{ needs.calculate-version.outputs.Major }}
outputs:
SEMVER: ${{ steps.calc-semver.outputs.semver }}
steps:
- run: echo $SEMVER
- name: Add 3 to calculated semver
run: |
echo SEMVER="$((3 + MAJOR))${SEMVER:1}" >> $GITHUB_ENV
- name: Set semver to output
id: calc-semver
run: echo "::set-output name=semver::$(echo $SEMVER)"
lint-and-test:
name: Workspace
strategy:
matrix:
workspace: [model, designer, runner, submitter]
uses: ./.github/workflows/lint-and-test.yml
with:
workspace: ${{ matrix.workspace }}
build-and-publish-images:
name: Build and publish
needs: [calculate-version, assign-semver, lint-and-test]
strategy:
matrix:
app: [designer, runner, submitter]
uses: ./.github/workflows/build.yml
secrets: inherit
with:
semver: ${{ needs.assign-semver.outputs.SEMVER }}
publish: true
app: ${{matrix.app}}
tag-branch:
runs-on: ubuntu-latest
needs: [calculate-version, assign-semver, build-and-publish-images]
env:
SEMVER: ${{ needs.assign-semver.outputs.SEMVER }}
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
token: ${{ secrets.GHCR_PAT }}
- name: Tag branch with run number
run: |
git tag ${{ env.SEMVER }}
git push --tags origin HEAD