Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github/workflows: add deploy relay workflows #2032

Merged
merged 10 commits into from
Apr 11, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/build-push-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,25 @@ jobs:
build-args: GITHUB_SHA=${{ github.sha }}
tags: ${{ steps.meta.outputs.tags }}

- name: Set short git commit SHA
id: vars
run: |
calculatedSha=$(git rev-parse --short ${{ github.sha }})
echo "::set-output name=short_sha::$calculatedSha"

- name: Trigger dev relay deploy job
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.CHARON_K8S_REPO_ACCESS_TOKEN }}
repository: ObolNetwork/obol-infrastructure
event-type: relay-dev-deployment
client-payload: |
'{
"relay_name": "relay-dev",
"relay_version": "${{ steps.vars.outputs.short_sha }}",
"cluster_size": "2"
}'

- name: Trigger charon-K8S deploy job
uses: peter-evans/repository-dispatch@v2
with:
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/relay-0-prod-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: 'Deploy Relay To Prod'
LukeHackett12 marked this conversation as resolved.
Show resolved Hide resolved

on:
workflow_dispatch:
inputs:
relay_name:
description: The docker image tag to deploy
required: true
type: choice
options:
- relay-0
- relay-1
image_tag:
description: The docker image tag to deploy
required: true
type: string

jobs:
deploy-relay:
runs-on: ubuntu-latest
name: Build Docker Image
steps:
- name: Trigger dev relay deploy job
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.CHARON_K8S_REPO_ACCESS_TOKEN }}
repository: ObolNetwork/obol-infrastructure
event-type: relay-prod-deployment
client-payload: |
'{
"relay_name": "${{ github.relay_name }}",
"relay_version": "${{ github.image_tag }}"
}'