Add image push ci for price service (#225)
* Add image push ci * Update image-push.yml
This commit is contained in:
parent
bbad8fb544
commit
4d5664a79f
|
@ -0,0 +1,29 @@
|
||||||
|
name: Build and Push Images
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
id-token: write
|
||||||
|
jobs:
|
||||||
|
price-service-image:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: aws-actions/configure-aws-credentials@v1
|
||||||
|
with:
|
||||||
|
role-to-assume: arn:aws:iam::192824654885:role/github-actions-ecr
|
||||||
|
aws-region: eu-west-2
|
||||||
|
- uses: aws-actions/amazon-ecr-login@v1
|
||||||
|
id: ecr_login
|
||||||
|
- run: |
|
||||||
|
DOCKER_BUILDKIT=1 docker build -f Dockerfile.wasm -o type=local,dest=. .
|
||||||
|
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -f third_party/pyth/price-service/Dockerfile.price_service .
|
||||||
|
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
|
||||||
|
env:
|
||||||
|
ECR_REGISTRY: ${{ steps.ecr_login.outputs.registry }}
|
||||||
|
ECR_REPOSITORY: pyth-price
|
||||||
|
IMAGE_TAG: ${{ github.sha }}
|
Loading…
Reference in New Issue