Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Push images to both management account and deployments account #16

Merged

Conversation

mdesouky
Copy link
Collaborator

@mdesouky mdesouky commented Oct 21, 2024

Changes:

  • Modify the workflow and to build and push images to the deployments account as well as the management account.

@mdesouky mdesouky requested review from uptickmetachu and removed request for uptickmetachu October 22, 2024 04:33
@uptickmetachu
Copy link
Collaborator

Can we squash all the commits after we've done our testing?

@mdesouky
Copy link
Collaborator Author

Can we squash all the commits after we've done our testing?

sure

@@ -385,7 +390,9 @@ jobs:
platforms: ${{inputs.docker-image-platforms}}
push: true
# Default to just the git short hash. if docker-tag-latest ; also tag as the latest image
tags: ${{inputs.docker-repository}}:${{inputs.docker-prefix && format('{0}-', inputs.docker-prefix) || ''}}${{env.GIT_SHORT_HASH}}${{inputs.docker-tag-latest && format(',{0}:latest',inputs.docker-repository)|| ''}}${{inputs.docker-tag && format(',{0}:{1}',inputs.docker-repository, inputs.docker-tag)|| ''}}
tags: |
${{ format('{0}:{1}{2}{3}{4}', inputs.docker-repository, inputs.docker-prefix && format('{0}-', inputs.docker-prefix) || '', env.GIT_SHORT_HASH, inputs.docker-tag-latest && format(',{0}:latest', inputs.docker-repository) || '', inputs.docker-tag && format(',{0}:{1}', inputs.docker-repository, inputs.docker-tag) || '') }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to need comments to show ht eexample output

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit of a maintenance night mare in the future but If it works it works.

Ideally we have a step to write this out cleanly via python etc but I won't block on that since if we don't need to touch it its not bad.

Can we leave a TODO comment to refactor this in the future into a script.

@mdesouky mdesouky force-pushed the dev-878/modify-ci-workflow-to-push-docker-images-to-two-repos branch from 0d99ec6 to d920a54 Compare October 22, 2024 23:12
@mdesouky mdesouky merged commit dfe420f into main Oct 22, 2024
5 checks passed
@mdesouky mdesouky deleted the dev-878/modify-ci-workflow-to-push-docker-images-to-two-repos branch October 22, 2024 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants