Skip to content

Commit

Permalink
[fortuna] push fortuna to ghrc
Browse files Browse the repository at this point in the history
  • Loading branch information
0xfirefist committed Feb 12, 2024
1 parent 5dcf5ca commit fd4469a
Showing 1 changed file with 21 additions and 13 deletions.
34 changes: 21 additions & 13 deletions .github/workflows/push-fortuna-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
permissions:
contents: read
id-token: write
packages: write
env:
REGISTRY: ghcr.io
IMAGE_NAME: pyth-network/fortuna
jobs:
fortuna-image:
runs-on: ubuntu-latest
Expand All @@ -27,18 +31,22 @@ jobs:
if: ${{ !startsWith(github.ref, 'refs/tags/fortuna-v') }}
run: |
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:
role-to-assume: arn:aws:iam::192824654885:role/github-actions-ecr
aws-region: eu-west-2
- uses: docker/login-action@v2
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: fortuna
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
registry: public.ecr.aws
env:
AWS_REGION: us-east-1
- run: |
DOCKER_BUILDKIT=1 docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -f fortuna/Dockerfile .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
env:
ECR_REGISTRY: public.ecr.aws
ECR_REPOSITORY: pyth-network/fortuna
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push server docker image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
file: "{context}/fortuna/Dockerfile"
push: true
tags: ${{ steps.fortuna.outputs.tags }}
labels: ${{ steps.fortuna.outputs.labels }}

0 comments on commit fd4469a

Please sign in to comment.