-
Notifications
You must be signed in to change notification settings - Fork 34
47 lines (41 loc) · 1.13 KB
/
ci-prod.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
name: CI Build prod image
on:
workflow_call:
inputs:
tag:
description: "tag to deploy from"
default: ""
required: false
type: string
permissions:
contents: read
jobs:
# test:
# ...
deploy:
runs-on: ubuntu-latest
# needs: test
name: Build and deploy
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Tag name
id: tag_name
run: |
if [ '${{ inputs.tag }}' = '' ]; then
echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
else
echo "TAG=$TAG" >> $GITHUB_OUTPUT
fi
env:
TAG: ${{ inputs.tag }}
- name: Build prod image
uses: lidofinance/dispatch-workflow@v1
env:
APP_ID: ${{ secrets.APP_ID }}
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
TARGET_REPO: "lidofinance/infra-mainnet"
TAG: "${{ steps.tag_name.outputs.TAG }}"
TARGET_WORKFLOW: "!! PUT CORRECT REFERENCE TO DEPLOY WF IN lidofinance/infra-mainnet HERE. EX. my_awesome_app.yml !!"