Skip to content

Commit

Permalink
[DDS-1845] Moved awx-ee build step to independent workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
GROwen committed Jan 18, 2024
1 parent d24aecc commit 4d7bcb0
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 17 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/build-deploy-awx-ee.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: build-deploy-bay-images
run-name: Build and deploy Bay images
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
18 changes: 1 addition & 17 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,20 +61,4 @@ jobs:
./gh-actions-bake.hcl
${{ steps.meta.outputs.bake-file }}
# Target the default group - probably unnecessary.
targets: ${{ matrix.images }}

- 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
targets: ${{ matrix.images }}

0 comments on commit 4d7bcb0

Please sign in to comment.