Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: build images for amd64 and arm64 #210

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 26 additions & 8 deletions .github/workflows/build-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,19 @@ jobs:
runs-on: ubuntu-20.04
name: Build and push latest tag from devel and on new commits
steps:
- name: Install QEMU static binaries
uses: docker/setup-qemu-action@v2

- name: Configure Buildkit
uses: docker/setup-buildx-action@v2

- name: Authenticate with Quay.io
uses: docker/login-action@v2
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}

- uses: actions/checkout@v2

- uses: actions/setup-python@v2
Expand All @@ -25,13 +38,18 @@ jobs:
python -m pip install --upgrade pip
pip install tox

- name: Build image
env:
DOCKER_BUILDKIT: 1
- name: Create build context for Docker
run: |
tox -e docker -- --tag=quay.io/ansible/awx-ee:latest
tox -e docker-create

- name: Push images
run: |
echo "${{ secrets.QUAY_TOKEN }}" | docker login quay.io -u ${{ secrets.QUAY_USERNAME }} --password-stdin
docker push quay.io/ansible/awx-ee:latest
- name: Build and push images
uses: docker/build-push-action@v4
with:
context: context
file: context/Dockerfile
push: true
platforms: |
linux/amd64
linux/arm64
tags: |
quay.io/ansible/awx-ee:latest
24 changes: 20 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ jobs:
runs-on: ubuntu-20.04
name: Docker
steps:
- name: Install QEMU static binaries
uses: docker/setup-qemu-action@v2

- name: Configure Buildkit
uses: docker/setup-buildx-action@v2

- uses: actions/checkout@v2

- uses: actions/setup-python@v2
Expand All @@ -44,8 +50,18 @@ jobs:
python -m pip install --upgrade pip
pip install tox

- name: Build EE with Docker
env:
DOCKER_BUILDKIT: 1
- name: Create build context for Docker
run: |
tox -e docker
tox -e docker-create

- name: Build EE with Docker
uses: docker/build-push-action@v4
with:
context: context
file: context/Dockerfile
push: false
platforms: |
linux/amd64
linux/arm64
tags: |
quay.io/ansible/awx-ee:latest
40 changes: 27 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,19 @@ jobs:
runs-on: ubuntu-20.04
name: Release
steps:
- name: Install QEMU static binaries
uses: docker/setup-qemu-action@v2

- name: Configure Buildkit
uses: docker/setup-buildx-action@v2

- name: Authenticate with Quay.io
uses: docker/login-action@v2
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}

- uses: actions/checkout@v2

- uses: actions/setup-python@v2
Expand All @@ -21,18 +34,19 @@ jobs:
python -m pip install --upgrade pip
pip install tox

- name: Build image
env:
DOCKER_BUILDKIT: 1
- name: Create build context for Docker
run: |
tox -e docker -- --tag=quay.io/ansible/awx-ee:${{ github.event.release.tag_name }}
tox -e docker-create

- name: Apply latest tag
run: |
docker tag quay.io/ansible/awx-ee:${{ github.event.release.tag_name }} quay.io/ansible/awx-ee:latest

- name: Push images
run: |
echo "${{ secrets.QUAY_TOKEN }}" | docker login quay.io -u ${{ secrets.QUAY_USERNAME }} --password-stdin
docker push quay.io/ansible/awx-ee:${{ github.event.release.tag_name }}
docker push quay.io/ansible/awx-ee:latest
- name: Build and push images
uses: docker/build-push-action@v4
with:
context: context
file: context/Dockerfile
push: true
platforms: |
linux/amd64
linux/arm64
tags: |
quay.io/ansible/awx-ee:latest
quay.io/ansible/awx-ee:${{ steps.image_tag.outputs.tag }}
7 changes: 7 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,10 @@ allowlist_externals =
commands =
/bin/bash -c "docker rmi quay.io/ansible/awx-ee:latest || true"
ansible-builder build -v3 -t quay.io/ansible/awx-ee {posargs} --container-runtime=docker

[testenv:docker-create]
passenv = HOME
allowlist_externals =
/bin/bash
commands =
ansible-builder create -v3 --output-filename Dockerfile