Skip to content

Merge pull request #3 from qualitive/ecr-alias #3

Merge pull request #3 from qualitive/ecr-alias

Merge pull request #3 from qualitive/ecr-alias #3

Workflow file for this run

name: Release
on:
push:
branches:
- 'release/*'
permissions:
contents: read
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Calculate version
id: spell
uses: actoaps/version-spell@v5
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: 21
distribution: corretto
cache: gradle
- name: Validate Gradle wrapper
uses: gradle/actions/wrapper-validation@v3
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build with Gradle
run: ./gradlew build
- name: Set up QEMU for multiarch docker builds
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Login to Amazon ECR Public
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
with:
registry-type: public
- name: Build webservice and publish to AWS ECR
uses: docker/build-push-action@v3
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
platforms: linux/arm64,linux/amd64
push: true
tags: |
public.ecr.aws/qualitive/heimdall:${{ steps.spell.outputs.version }}
public.ecr.aws/qualitive/heimdall:latest