-
Notifications
You must be signed in to change notification settings - Fork 4
59 lines (52 loc) · 1.93 KB
/
build-and-deploy-service.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
name: Build and deploy service
on:
push:
branches:
- master
workflow_dispatch:
inputs:
target_env:
type: choice
description: Target environment
default: staging
required: false
options:
- staging
- referrals
- orders
concurrency:
group: ${{ github.event_name }}-${{ github.event.inputs.target_env }}-service
cancel-in-progress: true
env:
service_name: volume-tracker
jobs:
build-and-deploy-service:
name: Build and deploy service
runs-on: ubuntu-latest
steps:
- name: Checkout Composite Actions Repository
uses: actions/checkout@v2
with:
repository: paraswap/paraswap-github-actions
ref: master
token: ${{ secrets.PARASWAP_GITHUB_ACTIONS_PAT }}
path: .github/paraswap-github-actions
- name: Build and deploy service using composite action
uses: ./.github/paraswap-github-actions/build-and-deploy-service
with:
service_name: ${{ env.service_name }}
repository_sha: ${{ github.sha}}
event_name: ${{ github.event_name }}
authentication_token: ${{ secrets.AUTHENTICATION_KEY }}
authorization_token: ${{ secrets.AUTHORIZATION_KEY }}
data_center: ${{ secrets.DATA_CENTER }}
target_env: ${{ github.event.inputs.target_env }}
# We re-checkout composite actions repository due to a known bug that if composite action does its own checkout, it deletes any previous checkouts
# thus, the post action fails on not finding the composite action we checked-out. See: https://github.com/actions/runner/issues/1300
- name: ReCheckout Composite Actions Repository
uses: actions/checkout@v2
with:
repository: paraswap/paraswap-github-actions
ref: master
token: ${{ secrets.PARASWAP_GITHUB_ACTIONS_PAT }}
path: .github/paraswap-github-actions