Update step names #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Push Images speech api | |
on: | |
push: | |
branches: | |
- build-speech-api | |
workflow_dispatch: | |
permissions: | |
id-token: write # This is required for requesting the JWT | |
contents: read # This is required for actions/checkout | |
jobs: | |
build-image: | |
runs-on: ubuntu-latest | |
environment: release | |
steps: | |
# As per https://github.com/orgs/community/discussions/25678 | |
- name: Delete huge unnecessary tools folder | |
run: rm -rf /opt/hostedtoolcache | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: arn:aws:iam::${{ vars.AWS_ACCOUNT_ID }}:role/momconnect-aaq-github-actions | |
role-session-name: github-actions | |
aws-region: us-east-1 # ${{ vars.AWS_REGION }} | |
- name: Login to Amazon ECR | |
id: login-ecr-public | |
uses: aws-actions/amazon-ecr-login@v2 | |
with: | |
registry-type: public | |
- name: Build and push Speech api | |
uses: docker/build-push-action@v5 | |
env: | |
REGISTRY: ${{ steps.login-ecr-public.outputs.registry }} | |
REGISTRY_ALIAS: j3r7b4k0 | |
REPOSITORY: momconnect-aaq/speech_api | |
with: | |
context: optional_components/speech_api/ | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: | | |
${{ env.REGISTRY }}/${{ env.REGISTRY_ALIAS }}/${{ env.REPOSITORY }}:latest | |
${{ env.REGISTRY }}/${{ env.REGISTRY_ALIAS }}/${{ env.REPOSITORY }}:${{ github.ref_name }} |