Skip to content

Build and deploy Bay AWX Execution Environment #2

Build and deploy Bay AWX Execution Environment

Build and deploy Bay AWX Execution Environment #2

name: build-deploy-bay-awx-ee
run-name: Build and deploy Bay AWX Execution Environment
on:
pull_request:
types:
- closed
- opened
- synchronize
schedule:
- cron: '23 20 * * 0'
workflow_dispatch:
env:
REGISTRY: ghcr.io
jobs:
buildx:
if: github.event.pull_request.merged == true || contains(fromJson('["schedule", "workflow_dispatch"]'), github.event_name) || github.event_name == 'pull_request' && startsWith(github.head_ref,'build/')
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- uses: actions/checkout@v3
- name: Login to registry ${{ env.REGISTRY }}
uses: docker/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and push AWX-EE
run: |
pip install --upgrade ansible-builder
cd images/awx-ee
ansible-builder build \
--file execution-environment.yml \
--build-arg PYCMD="/usr/local/bin/python3" \
--build-arg PKGMGR="/usr/bin/apt-get" \
--verbosity 3
- name: Build and push the images
uses: docker/bake-action@v4
with:
push: true
workdir: ./images/awx-ee