Skip to content

Commit

Permalink
Update devel_images.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
cigamit authored Sep 4, 2024
1 parent b58d102 commit d21431f
Showing 1 changed file with 23 additions and 34 deletions.
57 changes: 23 additions & 34 deletions .github/workflows/devel_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:
branches:
- devel
- jc_devel
- release_*
- feature_*
# - release_*
# - feature_*
jobs:
push-development-images:
runs-on: ubuntu-latest
Expand All @@ -28,51 +28,40 @@ 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')

- uses: actions/checkout@v3

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

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Checkout ascender
uses: actions/checkout@v3
with:
path: ascender
ref: devel

- 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: Get python version from Makefile
run: echo py_version=`make PYTHON_VERSION` >> $GITHUB_ENV

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

- 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)
# Downgrade requests to fix https://github.com/docker/docker-py/issues/3256
- name: Install playbook dependencies
run: |
sudo apt-get install gettext
make ui-release
# make ui-next
if: matrix.build-targets.image-name == 'awx'
python3 -m pip install docker==6.1.3 requests==2.31.0 --force-reinstall
- name: Build and push AWX devel images
- name: Build Ascender Devel Image
working-directory: ascender
run: |
make ${{ matrix.build-targets.make-target }}
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

0 comments on commit d21431f

Please sign in to comment.