-
Notifications
You must be signed in to change notification settings - Fork 20
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
1 parent
5ca582f
commit 116a66d
Showing
3 changed files
with
101 additions
and
1 deletion.
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,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 |
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,9 @@ | ||
FROM ghcr.io/eyblockchain/timber-multicontract:latest | ||
|
||
WORKDIR /app | ||
|
||
COPY ./merkle-tree/config/ config | ||
|
||
EXPOSE 80 | ||
CMD ["npm", "start"] | ||
|