go-ethereum/.github/workflows/dev-ecr-deploy.yml
Will Meister 1efe552752
Fix geth timestamp incrementing (#14)
* Making geth only update timestamp when it is over 600s older than current timestamp.
* Commenting out logic check to validate timestamp works the way it no longer works
2020-08-19 15:07:22 -05:00

50 lines
1.4 KiB
YAML

name: Build & Tag Container, Push to ECR, Deploy to Dev
on:
push:
branches:
- master
jobs:
build:
name: Build, Tag & push to ECR, Deploy task
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup golang
uses: actions/setup-go@v2
with:
go-version: '1.14.2'
- name: Install & Build
run: make all
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_CI_USER_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_CI_USER_SECRET_ACCESS_KEY }}
aws-region: us-east-2
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
- name: Build, tag, and push image to Amazon ECR
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: optimism/geth
IMAGE_TAG: latest
run: |
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
- name: Stop existing dev-geth ECS task to auto-start task with new image
run: |
./.github/scripts/stop-ecs-task.sh dev dev-all-in-one
- name: Logout of Amazon ECR
if: always()
run: docker logout ${{ steps.login-ecr.outputs.registry }}