-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Yurii Kovalchuk <[email protected]> Co-authored-by: Yurii Kovalchuk <[email protected]>
- Loading branch information
1 parent
b3e978a
commit db84212
Showing
12 changed files
with
509 additions
and
38 deletions.
There are no files selected for viewing
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
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,61 @@ | ||
name: Stage Build and Push Docker Images | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*.*.*.*' | ||
workflow_dispatch: | ||
|
||
env: | ||
image-tag: ${{ github.event_name == 'push' && (github.ref_name) || 'latest-manual' }} | ||
|
||
jobs: | ||
build-and-push: | ||
runs-on: ${{ matrix.platform.runs-on }} | ||
strategy: | ||
matrix: | ||
platform: | ||
- name: linux/amd64 | ||
image-suffix: amd64 | ||
runs-on: ubuntu-latest | ||
- name: linux/arm64 | ||
image-suffix: arm64 | ||
runs-on: arm64 | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
- name: Build and push | ||
uses: ./.github/actions/build-and-push | ||
with: | ||
docker-username: ${{ secrets.DOCKER_USERNAME }} | ||
docker-password: ${{ secrets.DOCKER_PASSWORD }} | ||
docker-base-repo: ${{ secrets.DOCKER_BASE_REPO_LIVE }}-${{ matrix.platform.image-suffix }} | ||
docker-tag: ${{ env.image-tag }} | ||
docker-platform: ${{ matrix.platform.name }} | ||
version: ${{ github.sha }} | ||
environment: live | ||
push-latest: true | ||
|
||
multiarch-push: | ||
runs-on: arm64 | ||
needs: build-and-push | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
- name: Multiarch push | ||
uses: ./.github/actions/multiarch-push | ||
with: | ||
docker-username: ${{ secrets.DOCKER_USERNAME }} | ||
docker-password: ${{ secrets.DOCKER_PASSWORD }} | ||
docker-base-repo: ${{ secrets.DOCKER_BASE_REPO_LIVE }} | ||
docker-tag: ${{ env.image-tag }} | ||
push-latest: true | ||
|
||
deploy: | ||
needs: multiarch-push | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Invoke workflow without inputs | ||
uses: benc-uk/workflow-dispatch@v1 | ||
with: | ||
workflow: Live Deploy |
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,34 @@ | ||
name: Live Deploy | ||
|
||
on: | ||
workflow_dispatch: | ||
workflow_call: | ||
|
||
env: | ||
image-name: ${{ secrets.DOCKER_BASE_REPO_LIVE }} | ||
image-tag: ${{ github.event_name == 'workflow_call' && 'latest' || github.sha }} | ||
da-1-hc-url: http://49.13.145.234:9230/tor/status-vote/current/consensus | ||
da-2-hc-url: http://5.161.108.187:9230/tor/status-vote/current/consensus | ||
da-3-hc-url: http://5.78.90.106:9230/tor/status-vote/current/consensus | ||
|
||
jobs: | ||
push: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Deploy new version | ||
uses: ./.github/actions/deploy | ||
with: | ||
image-tag: ${{ env.image-tag }} | ||
nomad-job-file: anon-da-node-live.hcl | ||
health-checks: "${{ env.da-1-hc-url }}|${{ env.da-2-hc-url }}|${{ env.da-3-hc-url }}" | ||
nomad-cacert: operations/admin-ui-ca.crt | ||
nomad-token: ${{ secrets.NOMAD_TOKEN_ATOR_NETWORK_DEPLOY }} | ||
nomad-addr: ${{ secrets.NOMAD_DEPLOY_ADDR }} | ||
consul-cacert: operations/admin-ui-ca.crt | ||
consul-http-token: ${{ secrets.CONSUL_HTTP_TOKEN_ATOR_NETWORK_DEPLOY }} | ||
consul-addr: ${{ secrets.CONSUL_DEPLOY_ADDR }} |
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
Oops, something went wrong.