Add workflow for xc-admin releases (#564)
This commit is contained in:
parent
8c57458c39
commit
ec070f37d6
|
@ -0,0 +1,35 @@
|
||||||
|
name: Build and Push Cross Chain Admin
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- xc-admin-v*
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
id-token: write
|
||||||
|
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}"
|
||||||
|
- uses: aws-actions/configure-aws-credentials@8a84b07f2009032ade05a88a28750d733cc30db1
|
||||||
|
with:
|
||||||
|
role-to-assume: arn:aws:iam::192824654885:role/github-actions-ecr
|
||||||
|
aws-region: eu-west-2
|
||||||
|
- uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: public.ecr.aws
|
||||||
|
env:
|
||||||
|
AWS_REGION: us-east-1
|
||||||
|
- run: |
|
||||||
|
DOCKER_BUILDKIT=1 docker build -t lerna -f tilt_devnet/docker_images/Dockerfile.lerna .
|
||||||
|
DOCKER_BUILDKIT=1 docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -f governance/xc_admin/Dockerfile .
|
||||||
|
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
|
||||||
|
env:
|
||||||
|
ECR_REGISTRY: public.ecr.aws
|
||||||
|
ECR_REPOSITORY: pyth-network/xc-admin
|
Loading…
Reference in New Issue