Skip to content

Commit 22c1fed

Browse files
author
Dev Kalra
authored
[price-pusher] add workflow to push docker image (#667)
* add workflow * update readme * correct docker build
1 parent bab6ccc commit 22c1fed

File tree

2 files changed

+51
-4
lines changed

2 files changed

+51
-4
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Build and Push Price Pusher Image
2+
on:
3+
push:
4+
tags:
5+
- pyth-price-pusher-v*
6+
workflow_dispatch:
7+
inputs:
8+
dispatch_description:
9+
description: "Dispatch description"
10+
required: true
11+
type: string
12+
permissions:
13+
contents: read
14+
id-token: write
15+
jobs:
16+
price-pusher-image:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v2
20+
- name: Set image tag to version of the git tag
21+
if: ${{ startsWith(github.ref, 'refs/tags/pyth-price-pusher-v') }}
22+
run: |
23+
PREFIX="refs/tags/pyth-price-pusher-"
24+
VERSION="${GITHUB_REF:${#PREFIX}}"
25+
echo "IMAGE_TAG=${VERSION}" >> "${GITHUB_ENV}"
26+
- name: Set image tag to the git commit hash
27+
if: ${{ !startsWith(github.ref, 'refs/tags/pyth-price-pusher-v') }}
28+
run: |
29+
echo "IMAGE_TAG=${{ github.sha }}" >> "${GITHUB_ENV}"
30+
- uses: aws-actions/configure-aws-credentials@8a84b07f2009032ade05a88a28750d733cc30db1
31+
with:
32+
role-to-assume: arn:aws:iam::192824654885:role/github-actions-ecr
33+
aws-region: eu-west-2
34+
- uses: docker/login-action@v2
35+
with:
36+
registry: public.ecr.aws
37+
env:
38+
AWS_REGION: us-east-1
39+
- uses: aws-actions/amazon-ecr-login@v1
40+
id: ecr_login
41+
- run: |
42+
DOCKER_BUILDKIT=1 docker build -t lerna -f tilt_devnet/docker_images/Dockerfile.lerna .
43+
DOCKER_BUILDKIT=1 docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -f price_pusher/Dockerfile .
44+
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
45+
env:
46+
ECR_REGISTRY: public.ecr.aws
47+
ECR_REPOSITORY: pyth-network/xc-price-pusher

price_pusher/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
# Pyth EVM price pusher
1+
# Pyth price pusher
22

3-
Pyth EVM price pusher is a service that regularly pushes updates to the on-chain Pyth price based on configurable conditions.
3+
Pyth price pusher is a service that regularly pushes updates to the on-chain Pyth price based on configurable conditions.
44

55
## Background
66

77
Pyth is a cross-chain oracle that streams price updates over the peer-to-peer [Wormhole Network](https://wormholenetwork.com/).
88
These price updates can be consumed on any chain that has a deployment of the Pyth contract.
99
By default, Pyth does not automatically update the on-chain price every time the off-chain price changes;
1010
instead, anyone can permissionlessly update the on-chain price prior to using it.
11-
For more information please refer to [this document](../pyth-evm-js/README.md#how-pyth-works-on-evm-chains).
11+
For more information please refer to [this document](https://docs.pyth.network/design-overview).
1212

1313
Protocols integrating with can update the on-chain Pyth prices in two different ways.
1414
The first approach is on-demand updates: package a Pyth price update together with each transaction that depends on it.
@@ -66,7 +66,7 @@ npm run start -- injective --grpc-endpoint https://grpc-endpoint.com \
6666
[--polling-frequency 5]
6767

6868
# Or, run the price pusher docker image instead of building from the source
69-
docker run public.ecr.aws/pyth-network/xc-evm-price-pusher:v<version> -- <above-arguments>
69+
docker run public.ecr.aws/pyth-network/xc-price-pusher:v<version> -- <above-arguments>
7070
```
7171

7272
### Command Line Arguments

0 commit comments

Comments
 (0)