Scaffold AWXMeshIngress #28
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
--- | |
name: Feature Branch Image Build and Push | |
on: | |
push: | |
branches: [feature_*] | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
name: Push devel image | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # needed so that git describe --tag works | |
- name: Set VERSION | |
run: | | |
echo "VERSION=$(git describe --tags)" >>${GITHUB_ENV} | |
- name: Set lower case owner name | |
run: | | |
echo "OWNER_LC=${OWNER,,}" >>${GITHUB_ENV} | |
env: | |
OWNER: '${{ github.repository_owner }}' | |
- name: Set IMAGE_TAG_BASE | |
run: | | |
echo "IMAGE_TAG_BASE=ghcr.io/${OWNER_LC}/awx-operator" >>${GITHUB_ENV} | |
- name: Set ARCH environment variable | |
run: | | |
echo "ARCH=$(case $(uname -m) in x86_64) echo -n amd64 ;; aarch64) echo -n arm64 ;; *) echo -n $(uname -m) ;; esac)" >>${GITHUB_ENV} | |
- name: Set OS environment variable | |
run: | | |
echo "OS=$(uname | awk '{print tolower($0)}')" >>${GITHUB_ENV} | |
- name: Install operator-sdk | |
run: | | |
echo "Installing operator-sdk ${OPERATOR_SDK_DL_URL}" && \ | |
curl -LO ${OPERATOR_SDK_DL_URL}/operator-sdk_${OS}_${ARCH} && \ | |
chmod +x operator-sdk_${OS}_${ARCH} && \ | |
sudo mkdir -p /usr/local/bin/ && \ | |
sudo mv operator-sdk_${OS}_${ARCH} /usr/local/bin/operator-sdk && \ | |
operator-sdk version | |
env: | |
OPERATOR_SDK_DL_URL: https://github.com/operator-framework/operator-sdk/releases/download/v1.26.0 | |
- name: Log in to registry | |
run: | | |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
- name: Build and Push awx-operator Image | |
run: | | |
make docker-build docker-push | |
docker tag ${IMAGE_TAG_BASE}:${VERSION} ${IMAGE_TAG_BASE}:${GITHUB_REF##*/} | |
docker push ${IMAGE_TAG_BASE}:${GITHUB_REF##*/} | |
- name: Build bundle manifests | |
run: | | |
make bundle | |
- name: Build and Push awx-operator Bundle | |
run: | | |
make bundle-build bundle-push | |
docker tag ${IMAGE_TAG_BASE}-bundle:v${VERSION} ${IMAGE_TAG_BASE}-bundle:${GITHUB_REF##*/} | |
docker push ${IMAGE_TAG_BASE}-bundle:${GITHUB_REF##*/} | |
- name: Build and Push awx-operator Catalog | |
run: | | |
make catalog-build catalog-push | |
docker tag ${IMAGE_TAG_BASE}-catalog:v${VERSION} ${IMAGE_TAG_BASE}-catalog:${GITHUB_REF##*/} | |
docker push ${IMAGE_TAG_BASE}-catalog:${GITHUB_REF##*/} |