From 1b88e8feaf24c7441574f57ae5e2f6e61f3226ee Mon Sep 17 00:00:00 2001 From: Andreas Reischuck Date: Mon, 1 Jul 2024 04:43:08 +0200 Subject: [PATCH] Add Ubuntu 24.04 and Ansible 2.17.1 --- .github/workflows/docker_build.yml | 25 ++++++++++++++++++++++--- python3/Dockerfile | 3 ++- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index 8cdf168..3b74bcf 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -26,6 +26,14 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + - name: Login to GitHub Container Registry + if: github.event_name != 'pull_request' + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Ansible ${{ matrix.ansible }} uses: docker/build-push-action@v2 with: @@ -33,8 +41,10 @@ jobs: push: ${{ github.event_name != 'pull_request' }} file: python2/Dockerfile tags: | - hnhs/ansible:py2-${{ matrix.distro }}-latest hnhs/ansible:py2-${{ matrix.distro }}-${{ matrix.ansible }} + ghcr.io/hicknhack-software/ansible:py2-${{ matrix.distro }}-${{ matrix.ansible }} + hnhs/ansible:py2-${{ matrix.distro }}-latest + ghcr.io/hicknhack-software/ansible:py2-${{ matrix.distro }}-latest build-args: | DISTRO=${{ matrix.distro }} ANSIBLE_VERSION=${{ matrix.ansible }} @@ -49,6 +59,15 @@ jobs: - distro: focal ansible: 2.11.4 ansible_git: v2.11.4 + - distro: noble + ansible: 2.17.1 + ansible_git: v2.17.1 + extra_tags: | + hnhs/ansible:latest + hnhs/ansible:noble-latest + ghcr.io/hicknhack-software/ansible:latest + ghcr.io/hicknhack-software/ansible:noble-latest + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -70,9 +89,9 @@ jobs: push: ${{ github.event_name != 'pull_request' }} file: python3/Dockerfile tags: | - hnhs/ansible:latest - hnhs/ansible:${{ matrix.distro }}-latest hnhs/ansible:${{ matrix.distro }}-${{ matrix.ansible }} + ghcr.io/hicknhack-software/ansible:${{ matrix.distro }}-${{ matrix.ansible }} + ${{ matrix.extra_tags }} build-args: | DISTRO=${{ matrix.distro }} ANSIBLE_VERSION=${{ matrix.ansible }} diff --git a/python3/Dockerfile b/python3/Dockerfile index 89bde8d..caa7c86 100644 --- a/python3/Dockerfile +++ b/python3/Dockerfile @@ -2,7 +2,7 @@ ARG DISTRO=focal ARG ANSIBLE_VERSION=2.11.3 ARG ANSIBLE_GIT_BRANCH=v2.11.3 ARG ANSIBLE_DIR=/opt/ansible -ARG ANSIBLE_GIT_REPO=git://github.com/ansible/ansible.git +ARG ANSIBLE_GIT_REPO=https://github.com/ansible/ansible.git FROM ubuntu:${DISTRO} AS ansible ARG DISTRO @@ -32,6 +32,7 @@ RUN \ openssh-client \ sshpass \ && ln -s /usr/bin/python3 /usr/bin/python \ + && rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED \ && pip install resolvelib==0.5.4 \ && apt-get purge --yes --quiet \ python3-pip \