-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: issues while pushing mapt image for PRs and releases
This commit will split the push behavior, from on build and push for Release will happen on build-oci action, meanwhile build for PR will be mange on build-oci and push to ghcr is done on a push-oci-pr Signed-off-by: Adrian Riobo <[email protected]>
- Loading branch information
1 parent
f2f3679
commit b75784d
Showing
3 changed files
with
112 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: oci-pr-push | ||
|
||
on: | ||
workflow_run: | ||
workflows: | ||
- oci-builds | ||
types: | ||
- completed | ||
|
||
jobs: | ||
push: | ||
name: push | ||
if: | | ||
github.event.workflow_run.conclusion == 'success' && | ||
github.event.workflow_run.event == 'pull_request' | ||
runs-on: ubuntu-24.04 | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Download mapt assets | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: mapt | ||
run-id: ${{ github.event.workflow_run.id }} | ||
github-token: ${{ github.token }} | ||
|
||
- name: Get mapt build informaiton | ||
run: | | ||
echo "image=$(cat mapt-image)" >> "$GITHUB_ENV" | ||
- name: Log in to ghcr.io | ||
uses: redhat-actions/podman-login@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
|
||
- name: Push mapt | ||
run: | | ||
# Load images from build | ||
podman load -i mapt-arm64.tar | ||
podman load -i mapt-amd64.tar | ||
# Push | ||
podman push ${{ env.image }}-arm64 | ||
podman push ${{ env.image }}-amd64 | ||
podman manifest create ${{ env.image }} | ||
podman manifest add ${{ env.image }} docker://${{ env.image }}-arm64 | ||
podman manifest add ${{ env.image }} docker://${{ env.image }}-amd64 | ||
podman manifest push --all ${{ env.image }} |
This file was deleted.
Oops, something went wrong.