-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Piotr Grzeskowiak
committed
Nov 22, 2023
1 parent
aa1ed0f
commit 7544fc3
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
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
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 }} |