diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index 8cdf168..c52200f 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -14,27 +14,37 @@ jobs: ansible_git: v2.5.4 runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub if: github.event_name != 'pull_request' - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + - name: Login to GitHub Container Registry + if: github.event_name != 'pull_request' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Ansible ${{ matrix.ansible }} - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v6 with: target: ansible 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,30 +59,47 @@ 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 + - uses: actions/checkout@v4 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub if: github.event_name != 'pull_request' - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + - name: Login to GitHub Container Registry + if: github.event_name != 'pull_request' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Ansible ${{ matrix.ansible }} - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v6 with: target: ansible 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 \