From d13af06b5952285a18d901398f5c443af05ed6e9 Mon Sep 17 00:00:00 2001 From: yossiz16 Date: Wed, 10 Mar 2021 11:41:33 +0200 Subject: [PATCH] Update and rename main.yml to build_and_push_image_to_azure --- .../workflows/ build_and_push_image_to_azure | 18 ++++++++++++ .github/workflows/main.yml | 29 ------------------- 2 files changed, 18 insertions(+), 29 deletions(-) create mode 100644 .github/workflows/ build_and_push_image_to_azure delete mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/ build_and_push_image_to_azure b/.github/workflows/ build_and_push_image_to_azure new file mode 100644 index 0000000..fc23101 --- /dev/null +++ b/.github/workflows/ build_and_push_image_to_azure @@ -0,0 +1,18 @@ + +on: + push: + tags: + - 'v*' + +jobs: + + build_and_test: + runs-on: ubuntu-latest + + steps: + - name: Azure Pipelines Action + uses: Azure/pipelines@v1 + with: + azure-devops-project-url: https://dev.azure.com/Libot-Mipui-Org/file-download-server + azure-pipeline-name: 'build-and-push-to-ACR' + azure-devops-token: ${{ secrets.AZURE_DEVOPS_TOKEN }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 698392d..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: CI - -on: [pull_request] - -jobs: - - build_and_test: - runs-on: ubuntu-latest - 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: eu-west-1 - - name: Login to Amazon ECR - id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 - - - name: Build, tag, and push image to Amazon ECR - env: - ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} - ECR_REPOSITORY: ${{ secrets.ECR_REPOSITORY }} - IMAGE_TAG: ${{ github.sha }} - run: | - docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . - docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG