Skip to content

Commit

Permalink
Merge pull request #103 from uc-cdis/test/image-build-upgrade
Browse files Browse the repository at this point in the history
Test/image build upgrade
  • Loading branch information
emalinowski committed Jun 25, 2024
2 parents 3cbef6b + 991f975 commit 51217be
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/image_build_push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ on:
BUILD_PLATFORMS:
required: false
type: string
default: "linux/amd64"
default: "linux/amd64, linux/arm64"
secrets:
ECR_AWS_ACCESS_KEY_ID:
required: true
Expand All @@ -52,15 +52,15 @@ jobs:
steps:
# https://github.com/docker/login-action#quayio
- name: Login to Quay.io
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_ROBOT_TOKEN }}

# https://github.com/docker/login-action#aws-public-elastic-container-registry-ecr
- name: Login to ECR
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ${{ inputs.AWS_ECR_REGISTRY }}
username: ${{ secrets.ECR_AWS_ACCESS_KEY_ID }}
Expand All @@ -69,17 +69,17 @@ jobs:
AWS_REGION: ${{ inputs.AWS_REGION }}

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.3.0

- name: Set Variables
shell: bash
run: |
Expand Down Expand Up @@ -110,15 +110,15 @@ jobs:
- name: Extract metadata
id: meta
uses: docker/metadata-action@v3
uses: docker/metadata-action@v5
with:
images: |
quay.io/cdis/${{ env.REPO_NAME }}:${{ env.IMAGE_TAG }}
${{ inputs.AWS_ECR_REGISTRY }}/gen3/${{ env.REPO_NAME }}:${{ env.IMAGE_TAG }}
- name: Build and push
if: ${{ !inputs.USE_QUAY_ONLY }}
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
# You may get ECR-push errors when first adding the workflow to a github repo.
# If so, run the following in dev/qa to create the ECR repository:
# qaplanetv1@cdistest_dev_admin:~$ aws ecr create-repository --repository-name "gen3/<repo name>" --image-scanning-configuration scanOnPush=true
Expand All @@ -136,7 +136,7 @@ jobs:

- name: Build and push (Quay only)
if: ${{ inputs.USE_QUAY_ONLY }}
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: ${{ inputs.DOCKERFILE_BUILD_CONTEXT }}
file: ${{ inputs.DOCKERFILE_LOCATION }}
Expand Down

0 comments on commit 51217be

Please sign in to comment.