Skip to content

feat: updated the pipeline for ldap image #5

feat: updated the pipeline for ldap image

feat: updated the pipeline for ldap image #5

on:
pull_request:
branches: [ main ]
name: AWS ECR push
jobs:
deploy:
name: Deploy
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
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
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
- name: Build, tag, and push the image to Amazon ECR
id: build-image
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: ${{ secrets.REPO_NAME }}
IMAGE_TAG: ${{ github.sha }}
run: |
# Build a docker container and push it to ECR
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
echo "Pushing image to ECR..."
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
echo "::set-output name=image::$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG"
- name: Tagging the latest image
id: tag-image
env:
LATEST_TAG: latest
run: |

Check failure on line 44 in .github/workflows/docker-publish.yml

View workflow run for this annotation

GitHub Actions / AWS ECR push

Invalid workflow file

The workflow is not valid. .github/workflows/docker-publish.yml (Line: 44, Col: 12): Unrecognized named-value: 'LATEST_TAG'. Located at position 1 within expression: LATEST_TAG
docker tag 730335644419.dkr.ecr.us-east-1.amazonaws.com/openldap: ${{ github.sha }} 730335644419.dkr.ecr.us-east-1.amazonaws.com/openldap: ${{ LATEST_TAG }}
docker push 730335644419.dkr.ecr.us-east-1.amazonaws.com/openldap:$LATEST_TAG
- name: Login to AWS
id : aws-login
run: |
aws eks update-kubeconfig --region us-east-1 --name TMF-INFRA-EKS
- name: Deploy the manifest files
id: deploy-app
run: |
kubectl apply -f kubernetes/*