generated from sergeyWh1te/go-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remade wfs to deploy to all clusters.
- Loading branch information
Showing
3 changed files
with
66 additions
and
42 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--- | ||
name: Build and deploy production image | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
env: | ||
IMAGE_NAME: onchain-mon | ||
IMAGE_TAG: stable | ||
|
||
jobs: | ||
build-and-push: | ||
name: Build and push stable 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 stable image | ||
steps: | ||
- name: Deploy to production cluster1 | ||
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: main | ||
DISPATCH_BRANCH: main | ||
TARGET_WORKFLOW: 'onchain_mon_prod1_deploy.yaml' | ||
- name: Deploy to production cluster2 | ||
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: main | ||
DISPATCH_BRANCH: main | ||
TARGET_WORKFLOW: 'onchain_mon_prod2_deploy.yaml' |