-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify generation of standard node images
- Loading branch information
Showing
13 changed files
with
74 additions
and
79 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
This file was deleted.
Oops, something went wrong.
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,38 @@ | ||
name: Build and Push Cross Chain Admin | ||
on: | ||
push: | ||
tags: | ||
- xc-admin-v* | ||
permissions: | ||
contents: read | ||
id-token: write | ||
packages: write | ||
env: | ||
REGISTRY: ghcr.io | ||
jobs: | ||
xc-admin-image: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set image tag to version of the git tag | ||
if: ${{ startsWith(github.ref, 'refs/tags/xc-admin-v') }} | ||
run: | | ||
PREFIX="refs/tags/xc-admin-" | ||
VERSION="${GITHUB_REF:${#PREFIX}}" | ||
echo "IMAGE_TAG=${VERSION}" >> "${GITHUB_ENV}" | ||
- name: Log in to the Container registry | ||
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build docker image | ||
run: | | ||
DOCKER_BUILDKIT=1 docker build --build-arg package="@pythnetwork/xc-admin-crank-executor" -t ${{ env.REGISTRY }}/pyth-network/xc-admin-crank-executor:${{ env.IMAGE_TAG }} -f Dockerfile.node . | ||
DOCKER_BUILDKIT=1 docker build --build-arg package="@pythnetwork/xc-admin-crank-pythnet-relayer" -t ${{ env.REGISTRY }}/pyth-network/xc-admin-crank-pythnet-relayer:${{ env.IMAGE_TAG }} -f Dockerfile.node . | ||
DOCKER_BUILDKIT=1 docker build --build-arg package="@pythnetwork/xc-admin-proposer-server" -t ${{ env.REGISTRY }}/pyth-network/xc-admin-proposer-server:${{ env.IMAGE_TAG }} -f Dockerfile.node . | ||
- name: Push docker image | ||
run: | | ||
docker push ${{ env.REGISTRY }}/pyth-network/xc-admin-crank-executor:${{ env.IMAGE_TAG }} | ||
docker push ${{ env.REGISTRY }}/pyth-network/xc-admin-crank-pythnet-relayer:${{ env.IMAGE_TAG }} | ||
docker push ${{ env.REGISTRY }}/pyth-network/xc-admin-proposer-server:${{ env.IMAGE_TAG }} |
This file was deleted.
Oops, something went wrong.
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,26 @@ | ||
FROM node:18.20-slim@sha256:1da7652745e9ba5de396e436aa086588ea50d532540fa3147fbc1957c43a46ab as builder-base | ||
WORKDIR /usr/src/pyth | ||
ENV PNPM_HOME="/pnpm" | ||
ENV PATH="$PNPM_HOME:$PATH" | ||
RUN apt-get update && apt-get install -y git python3 make gcc g++ && corepack enable | ||
COPY ./ . | ||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile | ||
|
||
|
||
FROM node:18.20-alpine@sha256:6937be95129321422103452e2883021cc4a96b63c32d7947187fcb25df84fc3f as runner-base | ||
WORKDIR /srv | ||
ENV NODE_ENV production | ||
RUN addgroup --system --gid 1001 pyth && adduser --system --uid 1001 pyth -g pyth && chown pyth:pyth . | ||
USER pyth | ||
|
||
|
||
FROM builder-base AS builder | ||
ARG package | ||
RUN pnpm exec lerna run build --scope="$package" --include-dependencies | ||
RUN pnpm deploy --filter $package --prod /srv/$package | ||
|
||
|
||
FROM runner-base AS runner | ||
ARG package | ||
COPY --from=builder --chown=pyth:pyth /srv/${package} ./ | ||
CMD [ "npm", "start" ] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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