Skip to content

Merge pull request #163 from tokamak-network/OR-2006_change-geth-script #138

Merge pull request #163 from tokamak-network/OR-2006_change-geth-script

Merge pull request #163 from tokamak-network/OR-2006_change-geth-script #138

name: Tokamak Optimism Publish (Nightly Version)
on:
push:
branches:
- main
jobs:
go-packages:
name: Publish Go Packages
strategy:
matrix:
package:
[
l2geth,
batch-submitter,
proxyd,
gas-oracle,
indexer,
op-exporter,
l2geth-exporter,
teleportr,
]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get version
id: extractver
run: |
echo "VERSION=$(jq -r .version ./${{ matrix.package }}/package.json)" >> $GITHUB_OUTPUT
echo "GITDATE=$(date +%d-%m-%Y)" >> $GITHUB_OUTPUT
echo "GITSHA=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_OUTPUT
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Publish Docker
uses: docker/build-push-action@v6
with:
context: .
file: ./${{ matrix.package }}/Dockerfile
push: true
provenance: false
tags: |
tokamaknetwork/titan-${{ matrix.package }}:nightly-${{ steps.extractver.outputs.VERSION }}
tokamaknetwork/titan-${{ matrix.package }}:nightly-${{ steps.extractver.outputs.GITSHA }}
build-args: |
GITDATE=${{ steps.extractver.outputs.GITDATE }}
GITCOMMIT=${{ steps.extractver.outputs.GITSHA }}
GITVERSION=${{ steps.extractver.outputs.VERSION }}
titan-packages:
name: Publish Titan Packages
strategy:
matrix:
package: [message-relayer, fault-detector]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get version
id: extractver
run: |
echo "VERSION=$(jq -r .version ./packages/tokamak/${{ matrix.package }}/package.json)" >> $GITHUB_OUTPUT
echo "GITDATE=$(date +%d-%m-%Y)" >> $GITHUB_OUTPUT
echo "GITSHA=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_OUTPUT
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Publish Titan Packages
uses: docker/build-push-action@v6
with:
context: .
file: ./ops/docker/Dockerfile.packages
target: titan-${{ matrix.package }}
push: true
provenance: false
tags: |
tokamaknetwork/titan-${{ matrix.package }}:nightly-${{ steps.extractver.outputs.VERSION }}
tokamaknetwork/titan-${{ matrix.package }}:nightly-${{ steps.extractver.outputs.GITSHA }}
build-args: |
GITDATE=${{ steps.extractver.outputs.GITDATE }}
GITCOMMIT=${{ steps.extractver.outputs.GITSHA }}
GITVERSION=${{ steps.extractver.outputs.VERSION }}
data-transport-layer:
name: Publish Data Transport Layer
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get version
id: extractver
run: |
echo "VERSION=$(jq -r .version ./packages/data-transport-layer/package.json)" >> $GITHUB_OUTPUT
echo "GITDATE=$(date +%d-%m-%Y)" >> $GITHUB_OUTPUT
echo "GITSHA=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_OUTPUT
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Publish Data Transport Layer
uses: docker/build-push-action@v6
with:
context: .
file: ./ops/docker/Dockerfile.packages
target: data-transport-layer
push: true
provenance: false
tags: |
tokamaknetwork/titan-data-transport-layer:nightly-${{ steps.extractver.outputs.VERSION }}
tokamaknetwork/titan-data-transport-layer:nightly-${{ steps.extractver.outputs.GITSHA }}
build-args: |
GITDATE=${{ steps.extractver.outputs.GITDATE }}
GITCOMMIT=${{ steps.extractver.outputs.GITSHA }}
GITVERSION=${{ steps.extractver.outputs.VERSION }}
deployer:
name: Publish Deployer
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get version
id: extractver
run: |
echo "RELEASE"=${GITHUB_REF#refs/*/} >> $GITHUB_OUTPUT
echo "VERSION=$(jq -r .version ./packages/tokamak/contracts/package.json)" >> $GITHUB_OUTPUT
echo "GITSHA=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_OUTPUT
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Publish Deployer
uses: docker/build-push-action@v6
with:
context: .
file: ./ops/docker/Dockerfile.packages
target: titan-deployer
push: true
provenance: false
tags: |
tokamaknetwork/titan-deployer:${{ steps.extractver.outputs.VERSION }}
tokamaknetwork/titan-deployer:${{ steps.extractver.outputs.GITSHA }}
build-args: |
GITDATE=${{ steps.extractver.outputs.GITDATE }}
GITCOMMIT=${{ steps.extractver.outputs.GITSHA }}
GITVERSION=${{ steps.extractver.outputs.VERSION }}