Skip to content

Commit

Permalink
solve merge conflict, remove ppc64le, add riscv64
Browse files Browse the repository at this point in the history
  • Loading branch information
bedroge committed Apr 5, 2024
2 parents 5bf780b + f01acd1 commit 2a9a027
Show file tree
Hide file tree
Showing 42 changed files with 1,159 additions and 256 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/Dockerfile-rockylinux-8
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@ FROM rockylinux:8

USER root

RUN yum install -y epel-release
RUN yum install -y ansible
RUN yum install -y cronie
RUN yum install -y git
RUN dnf install -y epel-release
RUN dnf install -y cronie
RUN dnf install -y git
RUN dnf install -y python3-pip

RUN python3 -m pip install --upgrade pip
RUN python3 -m pip install ansible

COPY ./.github/workflows/test-playbook.sh /test-playbook.sh

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Dockerfile-ubuntu-20.04
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN apt-get update
RUN apt-get install -y cron gpg python3-pip git
RUN env DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get install -y systemd

RUN pip3 install ansible
RUN pip3 install "ansible<9.0.0"

COPY ./.github/workflows/test-playbook.sh /test-playbook.sh

Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/ansible-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,22 @@ name: Ansible Lint

on: [push, pull_request]

# Declare default permissions as read only.
permissions: read-all

jobs:
ansible-lint:

runs-on: ubuntu-latest

steps:
# Important: This sets up your GITHUB_WORKSPACE environment variable
- uses: actions/checkout@v2
- name: checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0

- name: Lint Ansible Playbook
# replace "master" with any valid ref
uses: ansible/ansible-lint-action@main
uses: ansible/ansible-lint-action@27c37f9001153675ee6abcadcd722bcbdafaba08 # v6.8.2
with:
# [required]
# Paths to ansible files (i.e., playbooks, tasks, handlers etc..)
Expand Down
45 changes: 23 additions & 22 deletions .github/workflows/build-publish-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ on:
release:
types: [published]

# Declare default permissions as read only.
permissions: read-all

jobs:
build_and_publish:
name: Build and publish image
Expand All @@ -29,21 +32,21 @@ jobs:
contents: read
strategy:
matrix:
tag: ['client-pilot:centos7', 'build-node:debian10']
platform: [amd64, arm64, ppc64le, riscv64]
tag: ['client:centos7', 'build-node:debian11']
platform: [amd64, arm64, riscv64]

steps:
- name: Check out the repo
uses: actions/checkout@v2
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v2.1.0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@8c0edbc76e98fa90f69d9a2c020dcb50019dc325 # v2.2.1

- name: Cache Docker layers
uses: actions/cache@v2
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # v3.0.11
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ matrix.platform }}-${{ matrix.tag }}
Expand All @@ -52,7 +55,7 @@ jobs:
- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
Expand All @@ -65,7 +68,7 @@ jobs:
echo DOCKERFILE=Dockerfile.EESSI-${tag//:/-} >> $GITHUB_ENV
- name: Build and push to GitHub Packages
uses: docker/build-push-action@v2
uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5 #v3.2.0
with:
tags: ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}-${{ matrix.platform }}
file: containers/${{ env.DOCKERFILE }}
Expand All @@ -79,20 +82,20 @@ jobs:
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
create_manifest:
name: Create the Docker manifest
create_multiplatform_image:
name: Create the multi-platform Docker image
needs: build_and_publish
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
strategy:
matrix:
tag: ['client-pilot:centos7', 'build-node:debian10']
tag: ['client:centos7', 'build-node:debian11']
steps:
- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
Expand All @@ -102,16 +105,14 @@ jobs:
run: |
echo REPOSITORY_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
- name: Run docker manifest
- name: Create the final image using "docker buildx imagetools create"
if: github.event_name != 'pull_request'
run: |
docker manifest create \
ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }} \
--amend ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}-amd64 \
--amend ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}-arm64 \
--amend ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}-ppc64le \
--amend ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}-riscv64
- name: Push manifest
docker buildx imagetools create -t ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }} \
ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}-amd64 \
ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}-arm64 \
ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}-riscv64
- name: Inspect the final image
if: github.event_name != 'pull_request'
run: docker manifest push ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}
run: docker buildx imagetools inspect ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}
Loading

0 comments on commit 2a9a027

Please sign in to comment.