Skip to content

Commit

Permalink
Back to old way of creating images
Browse files Browse the repository at this point in the history
  • Loading branch information
cigamit committed Sep 3, 2024
1 parent b2854ae commit 5452aa8
Showing 1 changed file with 34 additions and 23 deletions.
57 changes: 34 additions & 23 deletions .github/workflows/devel_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
push:
branches:
- devel
# - release_*
# - feature_*
- release_*
- feature_*
jobs:
push-development-images:
runs-on: ubuntu-latest
Expand All @@ -27,40 +27,51 @@ jobs:
# - image-name: awx
# make-target: awx-kube-buildx
steps:

- name: Skipping build of awx image for non-awx repository
run: |
echo "Skipping build of awx image for non-awx repository"
exit 0
if: matrix.build-targets.image-name == 'awx' && !endsWith(github.repository, '/ascender')

- name: Checkout ascender
uses: actions/checkout@v3
with:
path: ascender
ref: devel
- uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Get python version from Makefile
run: echo py_version=`make PYTHON_VERSION` >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Set GITHUB_ENV variables
run: |
echo "DEV_DOCKER_TAG_BASE=ghcr.io/${OWNER,,}" >> $GITHUB_ENV
echo "COMPOSE_TAG=${GITHUB_REF##*/}" >> $GITHUB_ENV
echo py_version=`make PYTHON_VERSION` >> $GITHUB_ENV
env:
OWNER: '${{ github.repository_owner }}'

- name: Install python ${{ env.py_version }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.py_version }}

# Downgrade requests to fix https://github.com/docker/docker-py/issues/3256
- name: Install playbook dependencies
- name: Log in to registry
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Setup node and npm
uses: actions/setup-node@v2
with:
node-version: '16.13.1'
if: matrix.build-targets.image-name == 'awx'

- name: Prebuild UI for awx image (to speed up build process)
run: |
python3 -m pip install docker==6.1.3 requests==2.31.0 --force-reinstall
sudo apt-get install gettext
make ui-release
# make ui-next
if: matrix.build-targets.image-name == 'awx'

- name: Build Ascender Devel Image
working-directory: ascender
- name: Build and push AWX devel images
run: |
ansible-playbook -v tools/ansible/build.yml \
-e registry=ghcr.io \
-e registry_username=${{ github.actor }} \
-e registry_password=${{ secrets.GITHUB_TOKEN }} \
-e awx_image=${{ github.repository }}_devel \
-e awx_version=24 \
-e ansible_python_interpreter=$(which python3) \
-e push=yes \
-e awx_official=no
make ${{ matrix.build-targets.make-target }}

0 comments on commit 5452aa8

Please sign in to comment.