generated from sergeyWh1te/go-template
-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (46 loc) · 1.32 KB
/
development_build_and_deploy.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
---
name: Build and deploy devel image
on:
push:
branches:
- devel
env:
IMAGE_NAME: onchain-mon
IMAGE_TAG: devel
jobs:
build-and-push:
name: Build and push devel image
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Setup buildx
id: buildx
uses: docker/[email protected]
- name: Log in to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build docker image
id: docker_build_candidate
uses: docker/[email protected]
with:
push: true
tags: lidofinance/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
builder: ${{ steps.buildx.outputs.name }}
deploy:
needs:
- build-and-push
runs-on: ubuntu-latest
name: Deploy devel image
steps:
- name: Deploy to development cluster
uses: lidofinance/dispatch-workflow@v1
env:
APP_ID: ${{ secrets.APP_ID }}
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
TARGET_REPO: 'lidofinance/ansible-onchain-mon-infra'
TARGET: devel
DISPATCH_BRANCH: main
TARGET_WORKFLOW: 'onchain_mon_devel_deploy.yaml'