-
Notifications
You must be signed in to change notification settings - Fork 12
44 lines (38 loc) · 1.04 KB
/
branch-main.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
name: main branch workflow
on:
push:
branches: [main, feat/add-main-branch-ci-pipeline-MGX-834]
permissions:
contents: write
id-token: write
deployments: write
checks: write
# The following concurrency group queus in-progress jobs
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: false
jobs:
init:
name: Set global version
runs-on: ubuntu-latest
outputs:
GLOBAL_VERSION: ${{ steps.set_vars.outputs.GLOBAL_VERSION }}
steps:
- name: Set global version
id: set_vars
run: echo "GLOBAL_VERSION=${{ github.sha }}" >> $GITHUB_OUTPUT
build-and-test:
needs: [init]
name: Build
uses: ./.github/workflows/reusable-build-and-test.yml
secrets: inherit
with:
version: ${{ needs.init.outputs.GLOBAL_VERSION }}
deploy-dev:
name: Deploy `dev` environment
needs: [init, build-and-test]
uses: ./.github/workflows/reusable-deploy.yml
secrets: inherit
with:
env: dev
version: ${{ needs.init.outputs.GLOBAL_VERSION }}