-
Notifications
You must be signed in to change notification settings - Fork 4
60 lines (54 loc) · 1.95 KB
/
deploy_to_development.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
name: Deploy to Development
# Only one workflow in a concurrency group may run at a time
concurrency:
group: development-concurrency
cancel-in-progress: true
on:
push:
branches:
- "main"
jobs:
trigger-github-deployment:
name: Trigger GitHub Deployment
environment: Development
runs-on: ubuntu-latest
steps:
- name: Empty Step
run: echo "Hello World"
get-short-sha:
needs: trigger-github-deployment
outputs:
tag: ${{ steps.get-tag.outputs.tag }}
runs-on: ubuntu-latest
steps:
- id: get-tag
run: |
SHA_SHORT=$(echo ${{ github.sha }} | cut -c1-8)
echo "tag=$SHA_SHORT" >> "$GITHUB_OUTPUT"
build-and-push-components:
name: Build and push containers to acr for Development
needs: [trigger-github-deployment, get-short-sha]
uses: ./.github/workflows/publish_component.yml
with:
Registry: auroradevacr.azurecr.io
ImageName: robotics/inspection-data-analyzer
Tag: "dev.${{ needs.get-short-sha.outputs.tag }}"
secrets:
RegistryUsername: ${{ secrets.ROBOTICS_AURORADEVACR_USERNAME }}
RegistryPassword: ${{ secrets.ROBOTICS_AURORADEVACR_PASSWORD }}
deploy:
name: Update deployment in Development
needs: [build-and-push-components, get-short-sha, trigger-github-deployment]
uses: ./.github/workflows/update_aurora_deployment.yml
with:
Environment: development
Registry: auroradevacr.azurecr.io
ImageName: robotics/inspection-data-analyzer
# Add dev. prefix for the tags used in dev environment,
# due to the commit hash can be interpreted as an integer if only numbers
# PS: Needs to match build-and-push-components.with.Tag
Tag: "dev.${{ needs.get-short-sha.outputs.tag }}"
AuthorEmail: ${{ github.event.head_commit.author.email }}
AuthorName: ${{ github.event.head_commit.author.name }}
secrets:
DeployKey: ${{ secrets.ANALYTICS_INFRASTRUCTURE_DEPLOY_KEY }}