-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (44 loc) · 1.44 KB
/
build-deploy-awx-ee.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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 \
--container-runtime=docker \
--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