Skip to content

Remove newAddresses from documentation (#256) #176

Remove newAddresses from documentation (#256)

Remove newAddresses from documentation (#256) #176

name: Publish Dockerfile
on:
push:
branches:
- main
jobs:
build:
runs-on: buildjet-16vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v3
# Count the number of commits on the current branch
- name: Count commits
run: echo "COMMIT_COUNT=$(git rev-list --count HEAD)" >> $GITHUB_ENV
# Grab the short SHA from Git to use in tagging
- name: Grab Github short SHA
run: |
echo "SHORT_SHA=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_ENV
# Set up AWS CLI with credentials
- name: Set up AWS CLI
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.ECR_HELIUS_PROD_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.ECR_HELIUS_PROD_AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2
- name: Login to Amazon Public ECR
run: |
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws
# Build and push Docker image using matrix for different Dockerfiles
- name: Build and Push Docker image
run: |
IMAGE_TAG=${{ github.run_number }}-${{ env.SHORT_SHA }}
IMAGE_LOCATION=public.ecr.aws/f7o9l7p1/photon
IMAGE_URI=$IMAGE_LOCATION:$IMAGE_TAG
docker build . -t $IMAGE_URI -t $IMAGE_LOCATION:latest
docker push $IMAGE_URI
docker push $IMAGE_LOCATION:latest
echo "Image pushed: $IMAGE_URI"