diff --git a/.github/workflows/image-pipeline.yml b/.github/workflows/image-pipeline.yml deleted file mode 100644 index 61d811c..0000000 --- a/.github/workflows/image-pipeline.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: Deploy to App Runner - Image based # Name of the workflow -on: - push: - branches: [ master ] # Trigger workflow on git push to main branch - workflow_dispatch: # Allow manual invocation of the workflow -jobs: - deploy: - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - persist-credentials: false - - - name: Configure AWS credentials - id: 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: ${{ secrets.AWS_REGION }} - - - name: Login to Amazon ECR - id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 - - - name: Build, tag, and push image to Amazon ECR - id: build-image - env: - ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} - ECR_REPOSITORY: nodejs - IMAGE_TAG: ${{ github.sha }} - REACT_APP_API_KEY: ${{secrets.API_KEY}} - run: | - docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . - docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG - echo "::set-output name=image::$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" - - - name: Deploy to App Runner - id: deploy-apprunner - uses: awslabs/amazon-app-runner-deploy@main - with: - service: app-runner-image-deploy-service - image: ${{ steps.build-image.outputs.image }} - access-role-arn: ${{ secrets.ROLE_ARN }} - runtime: NODEJS_12 - region: ${{ secrets.AWS_REGION }} - cpu : 1 - memory : 2 - port: 5173 - wait-for-service-stability: true - branch: master - - - name: App Runner output - run: echo "App runner output ${{ steps.deploy-apprunner.outputs.service-id }}"