-
Notifications
You must be signed in to change notification settings - Fork 639
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
multi-architecture builds and publish (#1681)
* Add multi-arch image builds to makefile * A default set of platforms is specified and will build those if var `PLATFORMS` is not specified on the CLI * Builds containers and stores @ghcr with tag that is git commit. * Pushes the image to quay.io/ansible with tag devel. * Update Promote to use single build point and the multi-arch manifest - Pulls the complete manifest containing all architectures that matches the version from ghcr - Tag manifest with the specified version and publish to quay.io - Tag manifest as 'latest' and publish to quay.io Author: jon-nfc Co-authored-by: Christian M. Adams <[email protected]> Co-authored-by: TheRealHaoLiu
- Loading branch information
1 parent
7b95f03
commit 7e2c2bf
Showing
4 changed files
with
106 additions
and
42 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,15 +13,36 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Build Image | ||
- name: Fail if QUAY_REGISTRY not set | ||
run: | | ||
IMG=awx-operator:devel make docker-build | ||
if [[ -z "${{ vars.QUAY_REGISTRY }}" ]]; then | ||
echo "QUAY_REGISTRY not set. Please set QUAY_REGISTRY in variable GitHub Actions variables." | ||
exit 1 | ||
fi | ||
- name: Push To Quay | ||
uses: redhat-actions/[email protected] | ||
- name: Log into registry ghcr.io | ||
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 | ||
with: | ||
image: awx-operator | ||
tags: devel | ||
registry: quay.io/ansible/ | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
|
||
- name: Log into registry quay.io | ||
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 | ||
with: | ||
registry: ${{ vars.QUAY_REGISTRY }} | ||
username: ${{ secrets.QUAY_USER }} | ||
password: ${{ secrets.QUAY_TOKEN }} | ||
|
||
|
||
- name: Build and Store Image @ghcr | ||
run: | | ||
IMG=ghcr.io/${{ github.repository }}:${{ github.sha }} make docker-buildx | ||
- name: Publish Image to quay.io | ||
run: | | ||
docker buildx imagetools create \ | ||
ghcr.io/${{ github.repository }}:${{ github.sha }} \ | ||
--tag ${{ vars.QUAY_REGISTRY }}/awx-operator:devel |
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
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