Skip to content

Commit

Permalink
fix: rebuild timber
Browse files Browse the repository at this point in the history
  • Loading branch information
wenxing-wang-ey committed Jan 9, 2025
1 parent 5ca582f commit 116a66d
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/release-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Release updated
on:
push:
branches:
- wenxing/updateImages
- wenxing/updateImages--

jobs:
BuildDockerImage:
Expand Down
91 changes: 91 additions & 0 deletions .github/workflows/timber.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Timber Development Workflow

on:
push:
branches:
- wenxing/updateImages
jobs:

SetupEnvironment:
name: DEV::PR::Initialize the temporary PR environment
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup node environment
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: 'npm'
env:
GPR_TOKEN: ${{ secrets.GPR_TOKEN }}

- name: Restore Node modules from cache
id: cache-saas-transactional-ocm-zapps-node-modules
uses: actions/cache@v3
env:
cache-name: cache-saas-transactional-ocm-zapps-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
BuildDockerImage:
name: DEV::PR::Build and publish timber docker image
needs: [SetupEnvironment]
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup node environment
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: 'npm'
env:
GPR_TOKEN: ${{ secrets.GPR_TOKEN }}

- name: Restore Node modules from cache
id: cache-saas-transactional-ocm-zapps-node-modules
uses: actions/cache@v3
env:
cache-name: cache-saas-transactional-ocm-zapps-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
# - name: Set up Contract-Interfaces
# run: |
# CONTRACT_INTERFACES_DIR="./contract-interfaces"
# mkdir -p $CONTRACT_INTERFACES_DIR
# for contract in $(ls ./zapps/*/contracts/build/*Shield.json); do
# ln -f $contract ./contract-interfaces
# done
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ${{ secrets.GHCR_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push timber image
uses: docker/build-push-action@v3
with:
context: ./
file: ./Dockerfile.timber
build-args: |
GPR_TOKEN=${{ secrets.GPR_TOKEN }}
tags:
${{ secrets.GHCR_REGISTRY }}/eyblockchain/multiple-contracts-wwx:with-health-check
push: true
9 changes: 9 additions & 0 deletions Dockerfile.timber
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM ghcr.io/eyblockchain/timber-multicontract:latest

WORKDIR /app

COPY ./merkle-tree/config/ config

EXPOSE 80
CMD ["npm", "start"]

0 comments on commit 116a66d

Please sign in to comment.