Skip to content

Commit

Permalink
Use input vars instead of env ones
Browse files Browse the repository at this point in the history
  • Loading branch information
niconosenzo committed Oct 16, 2024
1 parent 4bc4bde commit 7afebab
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY_IMAGE }}
images: ${{ inputs.registry }}
tags: |
type=raw,value=${{ inputs.tags }}
Expand All @@ -110,9 +110,9 @@ jobs:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.ORG_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.ORG_AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ inputs.region }}

- name: Login to Amazon ECR
uses: aws-actions/amazon-ecr-login@v2
Expand All @@ -124,7 +124,7 @@ jobs:
context: .
platforms: linux/${{ matrix.platform }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
outputs: type=image,name=${{ inputs.registry }},push-by-digest=true,name-canonical=true,push=true

- name: Export digest
run: |
Expand Down Expand Up @@ -159,16 +159,16 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY_IMAGE }}
images: ${{ inputs.registry }}
tags: |
type=raw,value=${{ inputs.tags }}
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.ORG_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.ORG_AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ inputs.region }}

- name: Login to Amazon ECR
uses: aws-actions/amazon-ecr-login@v2
Expand All @@ -177,8 +177,8 @@ jobs:
working-directory: /tmp/digests
run: |
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
$(printf '${{ inputs.registry }}@sha256:%s ' *)
- name: Inspect image
run: |
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ inputs.tags }}
docker buildx imagetools inspect ${{ inputs.registry }}:${{ inputs.tags }}

0 comments on commit 7afebab

Please sign in to comment.