Update devel_images.yml #33
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Build/Push Development Images | |
env: | |
LC_ALL: "C.UTF-8" # prevent ERROR: Ansible could not initialize the preferred locale: unsupported locale setting | |
on: | |
push: | |
branches: | |
- devel | |
- release_* | |
- feature_* | |
jobs: | |
push-development-images: | |
timeout-minutes: 120 | |
permissions: | |
packages: write | |
contents: read | |
strategy: | |
fail-fast: false | |
matrix: | |
build-targets: | |
- image-name: awx_devel | |
make-target: docker-compose-build | |
# - image-name: awx_kube_devel | |
# make-target: awx-kube-dev-build | |
# - image-name: awx | |
# make-target: awx-kube-build | |
os: [macos-14] #[ubuntu-latest, macos-14] | |
runs-on: ${{ matrix.os }} | |
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, '/awx') | |
- name: Setup macos-14 runner | |
run: | | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
brew update | |
brew install bash | |
brew install gnu-sed | |
brew install docker | |
brew install docker-buildx | |
echo "/usr/local/bin" >> $GITHUB_PATH | |
echo "$(brew --prefix)/opt/gnu-sed/libexec/gnubin" >> $GITHUB_PATH | |
echo "LC_ALL=en_US.UTF-8" >> $GITHUB_ENV | |
if: matrix.os == 'macos-14' | |
- uses: actions/checkout@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: Set up QEMU | |
# uses: docker/setup-qemu-action@v3 | |
# - name: Set up Docker Buildx | |
# uses: docker/setup-buildx-action@v3 | |
- name: Install python ${{ env.py_version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ env.py_version }} | |
- name: Install ansible-core on macos-14 | |
run: | | |
pip install ansible-core | |
if: matrix.os == 'macos-14' | |
- 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: | | |
# sudo apt-get install gettext | |
# make ui-release | |
# make ui-next | |
# if: matrix.build-targets.image-name == 'awx' | |
- name: Build and push AWX devel images | |
run: | | |
make ${{ matrix.build-targets.make-target }} | |
- name: Push to ghcr.io | |
run: | | |
docker push ${DEV_DOCKER_TAG_BASE}/${{ matrix.build-targets.image-name }}:${COMPOSE_TAG} |