Merge pull request #4 from ga4gh/ja-iss-9-drs-object-access-via-jwt #8
This file contains hidden or 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
| # this workflow is triggered when a PR to the develop branch is merged. | |
| # the following steps are performed: | |
| # - build docker image and push to ECR (image tag is the git describe output as well as 'latest') | |
| name: AWS ECR Build and Push | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| permissions: | |
| id-token: write | |
| jobs: | |
| build-push: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout code | |
| id: checkout-code | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: save command output | |
| id: save-command-output | |
| run: | | |
| echo "DOCKER_REPO=refcloud-api" >> $GITHUB_ENV | |
| echo "DOCKER_TAG=$(git describe --tags)" >> $GITHUB_ENV | |
| - name: configure aws credentials | |
| id: configure-aws-credentials | |
| uses: aws-actions/configure-aws-credentials@v6.1.0 | |
| with: | |
| role-to-assume: ${{ secrets.AWS_ROLE_ARN }} | |
| aws-region: ${{ secrets.AWS_REGION }} | |
| - name: Set up QEMU | |
| id: set-up-qemu | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| id: set-up-docker-buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to Amazon ECR | |
| id: login-to-amazon-ecr | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com | |
| - name: Build and push to ECR | |
| id: build-and-push-to-ecr | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: liquibase | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: | | |
| ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com/${{ env.DOCKER_REPO }}-liquibase:${{ env.DOCKER_TAG }} | |
| ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com/${{ env.DOCKER_REPO }}-liquibase:develop | |
| ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com/${{ env.DOCKER_REPO }}-liquibase:latest |