forked from matter-labs/zksync
-
Notifications
You must be signed in to change notification settings - Fork 0
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
2 changed files
with
76 additions
and
52 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Build docker image | ||
on: | ||
workflow_call: | ||
secrets: | ||
DOCKERHUB_USER: | ||
description: 'DOCKERHUB_USER' | ||
required: true | ||
DOCKERHUB_TOKEN: | ||
description: 'DOCKERHUB_TOKEN' | ||
required: true | ||
inputs: | ||
image_tag: | ||
description: 'Tag of a built image to deploy' | ||
type: string | ||
required: true | ||
|
||
jobs: | ||
build-images: | ||
name: Build and Push Docker Images | ||
env: | ||
image_tag: ${{ inputs.image_tag }} | ||
runs-on: [self-hosted, ci-runner] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: setup-env | ||
run: | | ||
echo ZKSYNC_HOME=$(pwd) >> $GITHUB_ENV | ||
echo CI=1 >> $GITHUB_ENV | ||
echo $(pwd)/bin >> $GITHUB_PATH | ||
- name: start-services | ||
run: | | ||
docker-compose -f docker-compose-runner.yml up -d zk postgres | ||
- name: init | ||
run: | | ||
ci_run zk | ||
ci_run zk run yarn | ||
ci_run cp etc/tokens/{test,localhost}.json | ||
ci_run zk run verify-keys unpack | ||
ci_run zk db basic-setup | ||
- name: update-images | ||
run: | | ||
ci_run docker login -u ${{ secrets.DOCKERHUB_USER }} -p ${{ secrets.DOCKERHUB_TOKEN }} | ||
ci_run zk docker push server | ||
- name: docker-down | ||
if: always() | ||
run: | | ||
docker-compose -f docker-compose-runner.yml down |