Skip to content

Commit

Permalink
AWS/ECR public support
Browse files Browse the repository at this point in the history
  • Loading branch information
flowzone-app[bot] authored and ab77 committed Nov 2, 2023
1 parent 8efc99b commit 7fa8aa9
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 8 deletions.
52 changes: 49 additions & 3 deletions .github/workflows/flowzone.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 26 additions & 5 deletions flowzone.yml
Expand Up @@ -162,6 +162,20 @@
# so this will fail for external PRs as the automatic actions token will be read-only
password: ${{ secrets.GITHUB_TOKEN }}

- &loginWithECRPublic
name: Login to AWS/ECR (public)
continue-on-error: true
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
with:
registry: public.ecr.aws

- &loginWithECRPrivate
name: Login to AWS/ECR (private)
continue-on-error: true
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
with:
registry: ${{ matrix.image }}

- &customWorkingDirectory
defaults:
run:
Expand Down Expand Up @@ -420,7 +434,7 @@
github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name != github.repository
run: |
echo "::error::External workflows can not be used with `pull_request` events. \
echo "::error::External workflows can not be used with 'pull_request' events. \
Please contact a member of the organization for assistance."
exit 1
Expand All @@ -430,7 +444,7 @@
github.event_name == 'pull_request_target' &&
github.event.pull_request.head.repo.full_name == github.repository
run: |
echo "::error::Internal workflows should not be used with `pull_request_target` events. \
echo "::error::Internal workflows should not be used with 'pull_request_target' events. \
Please consult the documentation for more information."
exit 1
Expand Down Expand Up @@ -557,6 +571,7 @@
- &getAWSCallerIdentity
name: Get caller identity (AWS/whoami)
continue-on-error: true
run: aws sts get-caller-identity

- &updateKubeconfig
Expand Down Expand Up @@ -1485,9 +1500,7 @@ jobs:
- <<: *setupBuildx
with:
# pin to a known working version because v0.10.x will
# create a group called "default" that does not contain multiple targets
version: v0.9.1
version: v0.11.2

# generate a custom bake json string from the provided bake targets and any discovered bake files
# https://docs.docker.com/build/customize/bake/file-definition/#json-definition
Expand Down Expand Up @@ -2409,6 +2422,10 @@ jobs:
- *loginWithGitHubContainerRegistry
- *loginWithDockerHub
- *configureAWSCredentials
- *getAWSCallerIdentity
- *loginWithECRPublic
- *loginWithECRPrivate

# https://github.com/akhilerm/tag-push-action
- name: Publish manifest to remote(s)
Expand Down Expand Up @@ -2479,6 +2496,10 @@ jobs:
- *setupCrane
- *loginWithGitHubContainerRegistry
- *loginWithDockerHub
- *configureAWSCredentials
- *getAWSCallerIdentity
- *loginWithECRPublic
- *loginWithECRPrivate

# https://github.com/akhilerm/tag-push-action
- name: Publish final tags
Expand Down

0 comments on commit 7fa8aa9

Please sign in to comment.