Skip to content

remove oidc connector #5

remove oidc connector

remove oidc connector #5

Workflow file for this run

name: promote
on:
workflow_call:
inputs:
environment:
required: true
type: string
module:
required: true
type: string
workflow_dispatch:
inputs:
environment:
required: true
type: choice
options:
- sbx
- prod
- prod-test
module:
required: true
type: choice
options:
- api
- worker
jobs:
promote:
runs-on: ubuntu-latest
- name: Retag images in ECR

Check failure on line 32 in .github/workflows/promote.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/promote.yml

Invalid workflow file

You have an error in your yaml syntax on line 32
run: |
ECR_REPO_DOMAIN="${{ secrets.MGMT_ACCOUNT_ID }}.dkr.ecr.$AWS_REGION.amazonaws.com"
ECR_REPO_URI="$ECR_REPO_DOMAIN/ab2d_${{ inputs.module }}"
# Define target tags based on the environment
if [ "${{ inputs.environment }}" == "sandbox" ]; then
TARGET_TAG="sandbox-latest"
elif [ "${{ inputs.environment }}" == "prod" ]; then
TARGET_TAG="prod-latest"
elif [ "${{ inputs.environment }}" == "prod-test" ]; then
TARGET_TAG="prod-test-latest"
else
echo "Unsupported environment: ${{ inputs.environment }}"
exit 1
fi
# Get the manifest of the latest test image
MANIFEST=$(aws ecr batch-get-image --repository-name "ab2d_${{ inputs.module }}" --image-ids imageTag=ab2d-test-latest --output text --query 'images[].imageManifest')
# Retag the image
aws ecr put-image --repository-name "ab2d_${{ inputs.module }}" --image-tag "$TARGET_TAG" --image-manifest "$MANIFEST"
- name: Verify new tags
run: |
aws ecr describe-images --repository-name "ab2d_${{ inputs.module }}"