-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Test * Test * Test * update scripts
- Loading branch information
Showing
7 changed files
with
113 additions
and
2 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Check Code | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
|
||
jobs: | ||
check-code: | ||
name: Check Code | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install deps | ||
run: yarn install | ||
|
||
- name: Build | ||
run: yarn build |
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,51 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
workflow_dispatch: | ||
|
||
env: | ||
DOCKER_REGISTRY: ghcr.io | ||
|
||
jobs: | ||
release-docker-image: | ||
name: Publish docker image | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
package: | ||
- reporter | ||
- publisher | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Docker login | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
registry: ${{ env.DOCKER_REGISTRY }} | ||
|
||
- name: Tag | ||
uses: olegtarasov/get-tag@v2.1 | ||
- name: Sha | ||
uses: benjlevesque/short-sha@v1.2 | ||
|
||
- name: Publish docker image | ||
uses: docker/build-push-action@v6 | ||
with: | ||
push: true | ||
context: . | ||
file: packages/${{ matrix.package }}-client/Dockerfile | ||
tags: ${{ env.DOCKER_REGISTRY }}/${{ github.repository }}/${{ matrix.package }}:sha-${{ env.SHA }} | ||
|
||
- name: Publish docker image with tag | ||
uses: docker/build-push-action@v6 | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
with: | ||
push: true | ||
context: . | ||
file: packages/${{ matrix.package }}-client/Dockerfile | ||
tags: ${{ env.DOCKER_REGISTRY }}/${{ github.repository }}/${{ matrix.package }}:${{ env.GIT_TAG_NAME }} |
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,10 @@ | ||
FROM node:20-alpine as builder | ||
ADD . /build | ||
RUN cd /build \ | ||
&& yarn install \ | ||
&& yarn build:offchain | ||
|
||
FROM node:20-alpine | ||
COPY --from=builder /build /app | ||
|
||
ENTRYPOINT ["/app/scripts/publisher.entrypoint.sh"] |
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,10 @@ | ||
FROM node:20-alpine as builder | ||
ADD . /build | ||
RUN cd /build \ | ||
&& yarn install \ | ||
&& yarn build:offchain | ||
|
||
FROM node:20-alpine | ||
COPY --from=builder /build /app | ||
|
||
ENTRYPOINT ["/app/scripts/reporter.entrypoint.sh"] |
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 @@ | ||
#!/bin/sh | ||
# | ||
|
||
set -e | ||
|
||
BIN_PATH=$(cd "$(dirname "$0")"; pwd -P) | ||
WORK_PATH=${BIN_PATH}/../ | ||
|
||
node ${WORK_PATH}/packages/publisher-client/dist/main.js $@ |
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 @@ | ||
#!/bin/sh | ||
# | ||
|
||
set -e | ||
|
||
BIN_PATH=$(cd "$(dirname "$0")"; pwd -P) | ||
WORK_PATH=${BIN_PATH}/../ | ||
|
||
node ${WORK_PATH}/packages/reporter-client/dist/main.js $@ |
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