Skip to content

Commit

Permalink
AlmaLinux does not fulfill 2.16 prerequisites
Browse files Browse the repository at this point in the history
  • Loading branch information
haxorof committed Nov 11, 2023
1 parent d3e78e8 commit 4d622f6
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
os: [almalinux, alpine, ubuntu]
os: [alpine, ubuntu]
version: [v2.13, v2.14, v2.15, v2.16]
steps:
- name: Checkout
Expand Down
80 changes: 80 additions & 0 deletions .github/workflows/ci_almalinux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: '0 1 * * 0'

env:
IMAGE_NAME: haxorof/ansible-core
LATEST_OS: alpine
LATEST_VERSION: v2.16
DOCKER_CLI_VERSION: "24.0.5"
GOSU_VERSION: "1.16"

jobs:
build_push:
runs-on: ubuntu-latest
strategy:
matrix:
os: [almalinux]
version: [v2.13, v2.14, v2.15]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Prepare
id: prep
run: |
cp requirements/${MATRIX_VERSION}/requirements.txt requirements/requirements.txt
TAGS="${IMAGE_NAME}:${MATRIX_VERSION}-${MATRIX_OS}"
if [[ "$MATRIX_OS" == "$LATEST_OS" ]]; then
TAGS="${TAGS},${IMAGE_NAME}:$MATRIX_VERSION"
if [[ "$MATRIX_VERSION" == "$LATEST_VERSION" ]]; then
TAGS="${TAGS},${IMAGE_NAME}:latest-${MATRIX_OS},${IMAGE_NAME}:latest"
fi
elif [[ "$MATRIX_VERSION" == "$LATEST_VERSION" ]]; then
TAGS="${TAGS},${IMAGE_NAME}:latest-${MATRIX_OS}"
fi
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
echo "created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
env:
MATRIX_OS: ${{ matrix.os }}
MATRIX_VERSION: ${{ matrix.version }}

# Since sudo is used this will complain and suggest gosu but that
# needs to be tested if gosu can replace sudo for Ansible use-cases.
# - name: Lint Dockerfile
# uses: docker://replicated/dockerfilelint:latest
# with:
# args: Dockerfile.${{ matrix.os }}
- name: Set up Docker Buildx
uses: docker/[email protected]

- name: Login to DockerHub
uses: docker/[email protected]
if: ${{ endsWith(github.ref, '/main') }}
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and Push
uses: docker/[email protected]
with:
labels: |
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
org.opencontainers.image.source=${{ github.repositoryUrl }}
org.opencontainers.image.version=${{ matrix.version }}
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.licenses=${{ github.event.repository.license.name }}
build-args: |
docker_version=${{ env.DOCKER_CLI_VERSION }}
gosu_version=${{ env.GOSU_VERSION }}
tags: ${{ steps.prep.outputs.tags }}
context: .
file: ./Dockerfile.${{ matrix.os }}
push: ${{ endsWith(github.ref, '/main') }}
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ This repos stop supporting versions as it gets EOL according to [Ansible - Relea

## Simple Tags

- `v2.16-almalinux`
- `v2.16-alpine`
- `v2.16-ubuntu`
- `v2.15-almalinux`
Expand All @@ -41,7 +40,7 @@ This repos stop supporting versions as it gets EOL according to [Ansible - Relea
- `latest-almalinux`
- `v2.15-almalinux`
- `latest-ubuntu`
- `v2.15-ubuntu`
- `v2.16-ubuntu`

## Additions

Expand Down

0 comments on commit 4d622f6

Please sign in to comment.