diff --git a/.github/workflows/devel_images.yml b/.github/workflows/devel_images.yml index c243bb4..7783dd1 100644 --- a/.github/workflows/devel_images.yml +++ b/.github/workflows/devel_images.yml @@ -7,8 +7,8 @@ on: push: branches: - devel -# - release_* -# - feature_* + - release_* + - feature_* jobs: push-development-images: runs-on: ubuntu-latest @@ -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 }}