Skip to content

Build and Push latest image #2225

Build and Push latest image

Build and Push latest image #2225

Workflow file for this run

name: Build and Push latest image
on:
push:
# build and push anytime commits are merged to devel
branches:
- devel
schedule:
# build every 12 hours
- cron: '0 */12 * * *'
jobs:
build_and_push_latest:
runs-on: ubuntu-20.04
name: Build and push latest tag from devel and on new commits
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Quay login
run: |
echo "${{ secrets.QUAY_TOKEN }}" | docker login quay.io -u ${{ secrets.QUAY_USERNAME }} --password-stdin
- name: Build and push image
run: |
docker buildx create --name awx-ee-buildx
docker buildx use awx-ee-buildx
ansible-builder create -v3 --output-file=Dockerfile
docker buildx build \
--push \
--platform=linux/amd64,linux/arm64 \
--tag=${{ vars.IMAGE_REGISTRY }}/awx-ee:latest \
context