-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
3,994 additions
and
1 deletion.
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,45 @@ | ||
name: Protocol Build & Push Image to AWS ECR | ||
|
||
on: # yamllint disable-line rule:truthy | ||
push: | ||
branches: | ||
- 'roy/*' | ||
- 'release/protocol/v[0-9]+.[0-9]+.x' # e.g. release/protocol/v0.1.x | ||
- 'release/protocol/v[0-9]+.x' # e.g. release/protocol/v1.x | ||
|
||
jobs: | ||
build-and-push-mainnet: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./protocol | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: '0' # without this, ignite fails. | ||
|
||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_VALIDATOR_MAINNET }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_VALIDATOR_MAINNET }} | ||
aws-region: ap-northeast-1 | ||
|
||
- name: Login to Amazon ECR | ||
id: login-ecr | ||
uses: aws-actions/amazon-ecr-login@v1 | ||
|
||
- name: Build, Tag, and Push the Image to Amazon ECR | ||
id: build-image | ||
env: | ||
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} | ||
ECR_REPOSITORY: mainnet-full-node | ||
run: | | ||
make localnet-build-amd64 | ||
commit_hash=$(git rev-parse --short=7 HEAD) | ||
docker build \ | ||
--platform amd64 \ | ||
-t $ECR_REGISTRY/$ECR_REPOSITORY:$commit_hash \ | ||
-f testing/mainnet/Dockerfile . | ||
docker push $ECR_REGISTRY/$ECR_REPOSITORY --all-tags |
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 |
---|---|---|
|
@@ -10,7 +10,6 @@ | |
*.code-workspace | ||
|
||
# Build | ||
bin | ||
build | ||
vendor | ||
.vendor-new | ||
|
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,13 @@ | ||
FROM dydxprotocol-base | ||
|
||
RUN apk add --no-cache bash jq aws-cli | ||
RUN go install cosmossdk.io/tools/cosmovisor/cmd/[email protected] | ||
|
||
COPY ./testing/mainnet/. /dydxprotocol/ | ||
|
||
ENV HOME /dydxprotocol | ||
WORKDIR $HOME | ||
|
||
RUN /dydxprotocol/mainnet.sh | ||
|
||
ENTRYPOINT ["/dydxprotocol/start.sh"] |
Binary file not shown.
Oops, something went wrong.