Skip to content

Commit

Permalink
NIT-952 initial workflow version
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotr Grzeskowiak committed Nov 22, 2023
1 parent aa1ed0f commit 7544fc3
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/cloud-platform-build-push-share.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
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 }}

0 comments on commit 7544fc3

Please sign in to comment.