ci: update env variable name #132
Workflow file for this run
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
name: Publish Evmos node | |
on: | |
push: | |
tags: | |
- '*' | |
workflow_dispatch: | |
inputs: | |
zbc_build_image_tag: | |
description: 'Tag for zbc build docker image (defaul:latest)' | |
required: true | |
default: "latest" | |
type: string | |
evmos_node_tag: | |
description: 'Evmos node tag (default: latest)' | |
default: "latest" | |
type: string | |
required: false | |
env: | |
DOCKER_IMAGE: ghcr.io/zama-ai/evmos-node | |
defaults: | |
run: | |
working-directory: ./evmos | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
path: evmos | |
- name: Use tag from workflow disptach (if workflow dispatch) | |
if: github.event_name == 'workflow_dispatch' | |
run: echo "EVMOS_TAG=${{ inputs.evmos_node_tag }}" >> $GITHUB_ENV | |
- name: Use tag from tag push (if tag push) | |
if: github.event_name == 'push' && github.ref_type == 'tag' | |
run: echo "EVMOS_TAG=$GITHUB_REF_NAME" >> $GITHUB_ENV | |
- name: Get version for all needed repositories | |
working-directory: ./evmos | |
run: | | |
echo "TFHE_RS_VERSION=$(./scripts/get_version_from_makefile.sh TFHE_RS_VERSION)" >> $GITHUB_ENV | |
echo "ETHERMINT_VERSION=$(./scripts/get_module_version.sh go.mod zama.ai/ethermint)" >> $GITHUB_ENV | |
echo "GO_ETHEREUM_VERSION=$(./scripts/get_module_version.sh go.mod zama.ai/go-ethereum)" >> $GITHUB_ENV | |
- name: Echo versions parsed from Makefile and go.mod | |
run: | | |
echo "TFHE_RS_VERSION: $TFHE_RS_VERSION" | |
echo "ETHERMINT_VERSION: $ETHERMINT_VERSION" | |
echo "GO_ETHEREUM_VERSION: $GO_ETHEREUM_VERSION" | |
- name: Checkout tfhe-rs | |
uses: actions/checkout@v3 | |
with: | |
repository: zama-ai/tfhe-rs | |
token: ${{ secrets.CONCRETE_ACTIONS_TOKEN }} | |
path: ./evmos/work_dir/tfhe-rs | |
ref: ${{ env.TFHE_RS_VERSION }} | |
- name: Checkout go-ethereum | |
uses: actions/checkout@v3 | |
with: | |
repository: zama-ai/go-ethereum | |
token: ${{ secrets.CONCRETE_ACTIONS_TOKEN }} | |
path: ./evmos/work_dir/go-ethereum | |
ref: ${{ env.GO_ETHEREUM_VERSION }} | |
- name: Checkout ethermint | |
uses: actions/checkout@v3 | |
with: | |
repository: zama-ai/ethermint | |
token: ${{ secrets.CONCRETE_ACTIONS_TOKEN }} | |
path: ./evmos/work_dir/ethermint | |
ref: ${{ env.ETHERMINT_VERSION }} | |
- name: Check OS | |
run: | | |
lscpu | |
uname -r | |
lsb_release -a | |
- name: List files in the repository | |
run: | | |
ls ${{ github.workspace }} | |
- name: Check zbc build image docker tag | |
run: | | |
echo ${{ inputs.zbc_build_image_tag }} | |
- name: Prepare docker build | |
working-directory: ./evmos | |
run: | | |
make prepare-docker-publish | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: List files in the repository | |
run: | | |
ls ${{ github.workspace }} | |
tree -L 2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@4c0219f9ac95b02789c1075625400b2acbff50b1 | |
with: | |
platforms: linux/amd64,linux/arm64 | |
- name: Build and push Docker image | |
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc | |
with: | |
build_args: | | |
ZBC_VERSION=${{ inputs.zbc_build_image_tag }} | |
context: ./evmos | |
file: ./evmos/docker/Dockerfile.evmos-node.local | |
push: true | |
pull: true | |
platforms: linux/amd64,linux/arm64 | |
tags: ${{ env.DOCKER_IMAGE }}:${{ env.EVMOS_TAG }},${{ env.DOCKER_IMAGE }}:latest | |
labels: zbc-evmos-node | |
- name: Check docker images | |
working-directory: ./evmos | |
run: | | |
docker images | |
- name: Start build of dev image | |
shell: bash | |
env: | |
SECRET_TOKEN: ${{ secrets.CONCRETE_ACTIONS_TOKEN }} | |
run: | | |
curl -L -X POST \ | |
-H "Accept: application/vnd.github+json" \ | |
-H "Authorization: Bearer $SECRET_TOKEN" \ | |
-H "X-GitHub-Api-Version: 2022-11-28" \ | |
https://api.github.com/repos/zama-ai/evmos/actions/workflows/publish_developer_image.yml/dispatches \ | |
-d '{"ref":"v9.1.0-zama","inputs":{"evmos_node_tag":"${{ env.EVMOS_TAG }}", "ref_to_evmos": "${{ env.EVMOS_TAG }}"}}' |