Skip to content

Commit

Permalink
gitflows: update (ethereum#69)
Browse files Browse the repository at this point in the history
* gitflows: update

* gitflows: setup ssh agent

* workflows: check out right branch

* gitflows: build correct branch

* gitflows: try GITHUB_HEAD_REF

* gitflows: remove extra step

* gitflows: fix the dockerhub push

* gitflows: remove scripts

* gitflows: echo the integration commit

* gitflows: fix docker push

* gitflows: don't build batch-submitter

* gitflows: handle merge to master
  • Loading branch information
tynes authored Nov 3, 2020
1 parent 9163b89 commit 5dab271
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 195 deletions.
4 changes: 0 additions & 4 deletions .github/scripts/replace-aws-account-id.sh

This file was deleted.

17 changes: 0 additions & 17 deletions .github/scripts/stop-ecs-task.sh

This file was deleted.

49 changes: 0 additions & 49 deletions .github/workflows/dev-ecr-deploy.yml

This file was deleted.

20 changes: 16 additions & 4 deletions .github/workflows/dockerhub-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: Build & Push to DockerHub
on:
push:
branches:
- master
- testnet
- uat

jobs:
build:
Expand All @@ -12,16 +14,26 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v1

- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY_READ }}

- name: Login to DockerHub Registry
run: echo ${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }} | docker login -u ${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME}} --password-stdin

- name: Build and push Optimistic Ethereum Node image to DockerHub
run: |
docker build -t ethereumoptimism/optimistic-ethereum-node:latest .
docker push ethereumoptimism/optimistic-ethereum-node:latest
git clone https://github.com/ethereum-optimism/docker.git \
$HOME/docker
cd $HOME/docker
BRANCH=${GITHUB_REF##*/}
./build.sh -s go-ethereum -b $BRANCH
if [ $GITHUB_HEAD_REF == 'master' ]; then
docker push ethereumoptimism/go-ethereum:latest
elif [[ $BRANCH == 'uat' || $BRANCH == 'testnet' ]]; then
docker push ethereumoptimism/go-ethereum:$BRANCH
fi
- name: Logout of DockerHub
run: docker logout
21 changes: 10 additions & 11 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,23 @@ jobs:
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY_READ }}

- name: Setup node
uses: actions/setup-node@v1

- name: Build
run: |
git clone https://github.com/ethereum-optimism/optimism-integration.git \
$HOME/optimism-integration \
--recurse-submodules
REPO=$(echo $GITHUB_REPOSITORY | cut -d '/' -f2)
cd $HOME/optimism-integration/$REPO
REMOTE="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git"
git remote add gh $REMOTE
git fetch gh $GITHUB_SHA
git checkout $GITHUB_SHA
cd $HOME/optimism-integration
./docker/build.sh
if [ -z $GITHUB_HEAD_REF ]; then
GITHUB_HEAD_REF=${GITHUB_REF##*/}
fi
GIT_COMMIT=$(git rev-parse HEAD | head -c 8)
echo "optimism-integration $GIT_COMMIT"
./docker/build.sh -s go-ethereum -b $GITHUB_HEAD_REF
./docker/build.sh -s hardhat
./docker/build.sh -s deployer
./docker/build.sh -s integration-tests
- name: Test
run: |
cd $HOME/optimism-integration
./test.sh
GETH_L2_TAG=$GITHUB_HEAD_REF ./test.sh
55 changes: 0 additions & 55 deletions .github/workflows/testnet-ecr-build-push.yml

This file was deleted.

55 changes: 0 additions & 55 deletions .github/workflows/uat-ecr-build-push.yml

This file was deleted.

0 comments on commit 5dab271

Please sign in to comment.