-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(infra): separate out docker builds and binary uploads to their … (
#747) * chore(infra): separate out docker builds and binary uploads to their own workflow, limit concurrency to 1
- Loading branch information
1 parent
3060d60
commit a51456a
Showing
4 changed files
with
85 additions
and
56 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[worker.oci] | ||
max-parallelism = 1 |
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,79 @@ | ||
name: Upload Binaries and Docker Image | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: Github tag to release binaries for (reusing same tag will overwrite previously released binaries) | ||
required: true | ||
default: latest | ||
|
||
jobs: | ||
release: | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-18.04 | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: '0' | ||
ref: ${{ github.event.inputs.tag }} | ||
submodules: recursive | ||
|
||
- name: Set up ssh agent | ||
uses: webfactory/[email protected] | ||
with: | ||
ssh-private-key: ${{ secrets.CICD_RSA_KEY }} | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
|
||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v1 | ||
with: | ||
config: ./.github/buildkit-config.toml | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_TOKEN }} | ||
|
||
- name: Build and push docker image for all platforms | ||
run: | | ||
make build-push-docker-images | ||
env: | ||
SEMVER: ${{ steps.release.outputs.new_tag }} | ||
|
||
- name: Build Binaries for Linux/MacOS | ||
env: | ||
SEMVER: ${{ steps.release.outputs.new_tag }} | ||
run: | | ||
make build-binaries-in-docker | ||
- name: Upload binaries to release | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: ./bin/* | ||
tag: ${{ steps.release.outputs.new_tag }} | ||
overwrite: true | ||
file_glob: true | ||
|
||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: us-east-2 | ||
|
||
- name: Upload binaries to S3 | ||
env: | ||
S3_PATH: s3://axelar-releases/axelard/${{ steps.release.outputs.new_tag }} | ||
run: | | ||
aws s3 cp ./bin ${S3_PATH}/ --recursive |
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 |
---|---|---|
|
@@ -80,55 +80,3 @@ jobs: | |
TAG_CONTEXT: branch | ||
RELEASE_BRANCHES: main,releases.* | ||
WITH_V: true | ||
|
||
- name: Set up ssh agent | ||
uses: webfactory/[email protected] | ||
with: | ||
ssh-private-key: ${{ secrets.CICD_RSA_KEY }} | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
|
||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_TOKEN }} | ||
|
||
- name: Build and push docker image for all platforms | ||
run: | | ||
make build-push-docker-images | ||
env: | ||
SEMVER: ${{ steps.release.outputs.new_tag }} | ||
|
||
- name: Build Binaries for Linux/MacOS | ||
env: | ||
SEMVER: ${{ steps.release.outputs.new_tag }} | ||
run: | | ||
make build-binaries-in-docker | ||
- name: Upload binaries to release | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: ./bin/* | ||
tag: ${{ steps.release.outputs.new_tag }} | ||
overwrite: true | ||
file_glob: true | ||
|
||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: us-east-2 | ||
|
||
- name: Upload binaries to S3 | ||
env: | ||
S3_PATH: s3://axelar-releases/axelard/${{ steps.release.outputs.new_tag }} | ||
run: | | ||
aws s3 cp ./bin ${S3_PATH}/ --recursive |
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