[fortuna] push fortuna to ghrc (#1295)
* [fortuna] push fortuna to ghrc * precommit fix * test file path * address comment
This commit is contained in:
parent
2bfbfed6ab
commit
75769182f7
|
@ -12,6 +12,10 @@ on:
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
id-token: write
|
id-token: write
|
||||||
|
packages: write
|
||||||
|
env:
|
||||||
|
REGISTRY: ghcr.io
|
||||||
|
IMAGE_NAME: pyth-network/fortuna
|
||||||
jobs:
|
jobs:
|
||||||
fortuna-image:
|
fortuna-image:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -27,18 +31,22 @@ jobs:
|
||||||
if: ${{ !startsWith(github.ref, 'refs/tags/fortuna-v') }}
|
if: ${{ !startsWith(github.ref, 'refs/tags/fortuna-v') }}
|
||||||
run: |
|
run: |
|
||||||
echo "IMAGE_TAG=${{ github.sha }}" >> "${GITHUB_ENV}"
|
echo "IMAGE_TAG=${{ github.sha }}" >> "${GITHUB_ENV}"
|
||||||
- uses: aws-actions/configure-aws-credentials@8a84b07f2009032ade05a88a28750d733cc30db1
|
- name: Log in to the Container registry
|
||||||
|
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
|
||||||
with:
|
with:
|
||||||
role-to-assume: arn:aws:iam::192824654885:role/github-actions-ecr
|
registry: ${{ env.REGISTRY }}
|
||||||
aws-region: eu-west-2
|
username: ${{ github.actor }}
|
||||||
- uses: docker/login-action@v2
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Extract metadata (tags, labels) for Docker
|
||||||
|
id: metadata_fortuna
|
||||||
|
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
|
||||||
with:
|
with:
|
||||||
registry: public.ecr.aws
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
env:
|
- name: Build and push server docker image
|
||||||
AWS_REGION: us-east-1
|
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
|
||||||
- run: |
|
with:
|
||||||
DOCKER_BUILDKIT=1 docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -f fortuna/Dockerfile .
|
context: .
|
||||||
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
|
file: "./fortuna/Dockerfile"
|
||||||
env:
|
push: true
|
||||||
ECR_REGISTRY: public.ecr.aws
|
tags: ${{ steps.metadata_fortuna.outputs.tags }}
|
||||||
ECR_REPOSITORY: pyth-network/fortuna
|
labels: ${{ steps.metadata_fortuna.outputs.labels }}
|
||||||
|
|
Loading…
Reference in New Issue