NIT-952 initial workflow version #1
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: cloud-platform-build-push-share | |
on: | |
push: | |
branches: [main] | |
paths: | |
- 'docker-files/Dockerfile-share' | |
- '.github/workflows/cloud-platform-build-push-share.yml' | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write # This is required for requesting the JWT | |
contents: read # This is required for actions/checkout | |
steps: | |
- name: Checkout current repo | |
uses: actions/checkout@v3 | |
- name: Configure aws credentials for ECR | |
uses: aws-actions/[email protected] | |
with: | |
role-to-assume: ${{ secrets.ECR_ROLE_TO_ASSUME }} | |
aws-region: ${{ vars.ECR_REGION }} | |
- name: ECR login | |
uses: aws-actions/amazon-ecr-login@v2 | |
id: login-ecr | |
- name: Alfresco Enterprise image repository login | |
run: docker login quay.io -u ${{ secrets.ALFRESCO_QUAY_IO_USERNAME }} -p ${{ secrets.ALFRESCO_QUAY_IO_PASSWORD }} | |
- name: Build image and push to ECR | |
working-directory: ./docker-files | |
run: | | |
docker build -t $REGISTRY/$REPOSITORY:$IMAGE_TAG Dockerfile-share | |
docker push $REGISTRY/$REPOSITORY:$IMAGE_TAG | |
env: | |
REGISTRY: ${{ steps.login-ecr.outputs.registry }} | |
REPOSITORY: ${{ vars.ECR_REPOSITORY }} | |
IMAGE_TAG: ${{ github.sha }} |