Skip to content

Commit

Permalink
Add Ubuntu 24.04 and Ansible 2.17.1
Browse files Browse the repository at this point in the history
  • Loading branch information
arBmind committed Jul 1, 2024
1 parent 2d4a5ca commit 15f25d8
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 12 deletions.
49 changes: 38 additions & 11 deletions .github/workflows/docker_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand Down
3 changes: 2 additions & 1 deletion python3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 \
Expand Down

0 comments on commit 15f25d8

Please sign in to comment.