Skip to content

Build and publish fdp-contract blockchain image #37

Build and publish fdp-contract blockchain image

Build and publish fdp-contract blockchain image #37

name: Build and publish fdp-contract blockchain image
# GH release doc https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release
on:
release:
types: [published]
tags-ignore:
- fdp-contracts-js-lib*
workflow_dispatch:
jobs:
publish-contracts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Install dependencies
run: npm ci
- name: Run the environment
run: npm run env:start-base
- name: Build image
run: ./scripts/build-image.sh
# Publishing contracts to testnets locally for now
# - name: Deploy to Goerli
# run: ./scripts/deploy.sh goerli
# env:
# GOERLI_URL: ${{secrets.GOERLI_URL}}
# GOERLI_PRIVATE_KEY: ${{secrets.GOERLI_PRIVATE_KEY}}
# VALIDATOR_ADDRESS: '0xd27ffA0e47Fca8D3E757B4d2C408169859B8c419'
# MAX_INTERVAL: 100000
# - name: Deploy to Sepolia
# run: ./scripts/deploy.sh sepolia
# env:
# SEPOLIA_URL: ${{secrets.SEPOLIA_URL}}
# SEPOLIA_PRIVATE_KEY: ${{secrets.SEPOLIA_PRIVATE_KEY}}
# VALIDATOR_ADDRESS: '0xd27ffA0e47Fca8D3E757B4d2C408169859B8c419'
# MAX_INTERVAL: 100000
# - name: Deploy to Optimism Goerli
# run: ./scripts/deploy.sh optimism_goerli
# env:
# SEPOLIA_URL: ${{secrets.OPTIMISM_GOERLI_URL}}
# SEPOLIA_PRIVATE_KEY: ${{secrets.OPTIMISM_GOERLI_PRIVATE_KEY}}
# VALIDATOR_ADDRESS: '0xd27ffA0e47Fca8D3E757B4d2C408169859B8c419'
# MAX_INTERVAL: 100000
# - name: Deploy to Arbitrum Goerli
# run: ./scripts/deploy.sh arbitrum_goerli
# env:
# SEPOLIA_URL: ${{secrets.ARBITRUM_GOERLI_URL}}
# SEPOLIA_PRIVATE_KEY: ${{secrets.ARBITRUM_GOERLI_PRIVATE_KEY}}
# VALIDATOR_ADDRESS: '0xd27ffA0e47Fca8D3E757B4d2C408169859B8c419'
# MAX_INTERVAL: 100000
- name: Publish image
run: ./scripts/release-image.sh
- name: Commit new contract metadata
uses: EndBug/add-and-commit@v9
with:
author_name: CI
author_email: [email protected]
message: 'feat(contract-upgrade): update contract metadata'
add: 'js-library/src/contracts/'