diff --git a/.github/workflows/build-deploy-awx-ee.yml b/.github/workflows/build-deploy-awx-ee.yml new file mode 100644 index 00000000..49f380f6 --- /dev/null +++ b/.github/workflows/build-deploy-awx-ee.yml @@ -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/login-action@v2.2.0 + 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 diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index 9e2bed86..2fad1d60 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -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 }} \ No newline at end of file