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

Create a index manifest for the target repo #1245

Merged
merged 4 commits into from
Dec 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions .github/workflows/build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,26 @@ jobs:
linux/amd64
linux/arm64

- name: Copy image
run: docker buildx imagetools create -t ${{ steps.metadata.outputs.operator }} ${{ needs.build-operator.outputs.fullname }}
- name: Copy image
run: docker buildx imagetools create -t ${{ steps.metadata.outputs.pipeline }} ${{ needs.build-pipelinerunner.outputs.fullname }}
# This steps reads the original manifest,
# fetches all the digests from the manifest,
# and builds a new for the target repository
- name: Copy Operator image
env:
TARGETREPO: ${{ steps.metadata.outputs.operator }}
SOURCERPO: ${{ needs.build-operator.outputs.fullname }}
run: |
docker buildx imagetools inspect $SOURCEREPO --raw > manifest.json
tags=$(jq '[.manifests[] | env.SOURCEREPO + "@" + .digest] | join(" ")' -r manifest.json)
echo $tags | xargs docker buildx imagetools create --progress=plain --tag $TARGETREPO

- name: Copy Pipeline Runner image
env:
TARGETREPO: ${{ steps.metadata.outputs.pipeline }}
SOURCERPO: ${{ needs.build-pipelinerunner.outputs.fullname }}
run: |
docker buildx imagetools inspect $SOURCEREPO --raw > manifest.json
tags=$(jq '[.manifests[] | env.SOURCEREPO + "@" + .digest] | join(" ")' -r manifest.json)
echo $tags | xargs docker buildx imagetools create --progress=plain --tag $TARGETREPO

- name: Revoke GitHub IP on ACR
if: ${{ steps.update_firewall.outcome == 'success' && !cancelled()}} # Always run this step even if previous step failed
Expand Down
Loading