mirror of
https://github.com/ansible/awx-operator.git
synced 2026-03-27 05:43:11 +00:00
* 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 <chadams@redhat.com> Co-authored-by: TheRealHaoLiu
49 lines
1.3 KiB
YAML
49 lines
1.3 KiB
YAML
---
|
|
|
|
name: Devel
|
|
|
|
on:
|
|
push:
|
|
branches: [devel]
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
name: Push devel image
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Fail if QUAY_REGISTRY not set
|
|
run: |
|
|
if [[ -z "${{ vars.QUAY_REGISTRY }}" ]]; then
|
|
echo "QUAY_REGISTRY not set. Please set QUAY_REGISTRY in variable GitHub Actions variables."
|
|
exit 1
|
|
fi
|
|
|
|
- name: Log into registry ghcr.io
|
|
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
|
|
with:
|
|
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
|