Fix continue-on-error GH actions bug, always run archive step instead #1127
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: | |
if: endsWith(github.repository, '/awx') || startsWith(github.ref, 'refs/heads/release_') | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
contents: read | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get python version from Makefile | |
run: echo py_version=`make PYTHON_VERSION` >> $GITHUB_ENV | |
- name: Set lower case owner name | |
run: | | |
echo "OWNER_LC=${OWNER,,}" >>${GITHUB_ENV} | |
env: | |
OWNER: '${{ github.repository_owner }}' | |
- 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: Pre-pull image to warm build cache | |
run: | | |
docker pull ghcr.io/${OWNER_LC}/awx_devel:${GITHUB_REF##*/} || : | |
docker pull ghcr.io/${OWNER_LC}/awx_kube_devel:${GITHUB_REF##*/} || : | |
docker pull ghcr.io/${OWNER_LC}/awx:${GITHUB_REF##*/} || : | |
- name: Build images | |
run: | | |
DEV_DOCKER_TAG_BASE=ghcr.io/${OWNER_LC} COMPOSE_TAG=${GITHUB_REF##*/} make docker-compose-build | |
DEV_DOCKER_TAG_BASE=ghcr.io/${OWNER_LC} COMPOSE_TAG=${GITHUB_REF##*/} make awx-kube-dev-build | |
DEV_DOCKER_TAG_BASE=ghcr.io/${OWNER_LC} COMPOSE_TAG=${GITHUB_REF##*/} make awx-kube-build | |
- name: Push development images | |
run: | | |
docker push ghcr.io/${OWNER_LC}/awx_devel:${GITHUB_REF##*/} | |
docker push ghcr.io/${OWNER_LC}/awx_kube_devel:${GITHUB_REF##*/} | |
- name: Push AWX k8s image, only for upstream and feature branches | |
run: docker push ghcr.io/${OWNER_LC}/awx:${GITHUB_REF##*/} | |
if: endsWith(github.repository, '/awx') |