Skip to content

Commit

Permalink
fix(build/docker): (#88)
Browse files Browse the repository at this point in the history
* wip

* wip

* secret param

* move to inputs section

* try fix names

* fix pipe

* try removing ghcr

* Revert "try removing ghcr"

This reverts commit 90c91f7.

* add cache prefix

* try removing ghcr image

* try removing ghcr

* use credentials v3

* mask password

* remove repo-token

* format
  • Loading branch information
spg authored Aug 31, 2023
1 parent 9ed1894 commit 93c7eac
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions build/docker/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,15 @@ runs:
with:
driver-opts: ${{ inputs.driver-opts }}
buildkitd-flags: ${{ inputs.buildkitd-flags }}
- uses: aws-actions/configure-aws-credentials@v1
- uses: aws-actions/configure-aws-credentials@v3
with:
role-session-name: container_pusher
role-to-assume: ${{ inputs.aws-role }}
aws-region: ${{ inputs.aws-region }}
- uses: aws-actions/amazon-ecr-login@v1
id: ecr
with:
mask-password: true
- uses: docker/metadata-action@v4
id: meta
with:
Expand All @@ -79,16 +81,14 @@ runs:
# The cache is using an experimental feature from Github
# If there is any issues see the follow link
# https://github.com/docker/build-push-action/blob/master/docs/advanced/cache.md
- uses: docker/build-push-action@v3
env:
DOCKER_BUILDKIT: '1'
- uses: docker/build-push-action@v4
with:
context: ${{ inputs.context }}
build-args: ${{ inputs.build-args }}
file: ${{ inputs.dockerfile }}
push: ${{ inputs.push }}
cache-from: type=gha
cache-to: type=gha,mode=max
cache-from: type=registry,ref=${{ steps.ecr.outputs.registry }}/${{ inputs.repository }}:cache-${{ hashFiles(inputs.dockerfile) }}
cache-to: type=registry,ref=${{ steps.ecr.outputs.registry }}/${{ inputs.repository }}:cache-${{ hashFiles(inputs.dockerfile) }},mode=max,image-manifest=true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
network: ${{ inputs.network }}
Expand Down

0 comments on commit 93c7eac

Please sign in to comment.