From 6f723d43ce6de9892ed97aa62f562f5c9f0496f9 Mon Sep 17 00:00:00 2001 From: Kian-Tat Lim Date: Tue, 7 May 2024 10:56:26 -0700 Subject: [PATCH 1/2] Add AlmaLinux 9 Dockerfile. --- base-9/Dockerfile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 base-9/Dockerfile diff --git a/base-9/Dockerfile b/base-9/Dockerfile new file mode 100644 index 0000000..9e2014a --- /dev/null +++ b/base-9/Dockerfile @@ -0,0 +1,18 @@ +FROM almalinux:9 +LABEL MAINTAINER="Kian-Tat Lim " + +ENV SUMMARY="Rubin Observatory base AlmaLinux 9 image for building software" \ + DESCRIPTION="This is the base image required for conda, lsstsw, and \ +lsstinstall workflows" + +LABEL name="lsstdm/scipipe-base:9" \ + version="9" \ + summary="$SUMMARY" \ + description="$DESCRIPTION" \ + io.k8s.description="$DESCRIPTION" \ + io.k8s.display-name="Rubin Observatory AlmaLinux 9 container" + +RUN INSTALL_PKGS="git patch diffutils" && \ + yum install -y --setopt=tsflags=nodocs ${INSTALL_PKGS} && \ + rpm -V ${INSTALL_PKGS} && \ + yum -y clean all --enablerepo='*' From 05a80db99357681d79a4cbbae3bf25e37aeb36fd Mon Sep 17 00:00:00 2001 From: Kian-Tat Lim Date: Mon, 1 Jul 2024 17:34:40 -0700 Subject: [PATCH 2/2] Add build workflow. --- .github/workflows/build.yaml | 47 ++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..6732e30 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,47 @@ +name: Build + +on: + pull_request: + push: + tags: + - "*" + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + rhel: [9] + + steps: + - name: Define the tag + id: tag + shell: bash + run: | + if [ -n "$GITHUB_HEAD_REF" ]; then + echo tag=${GITHUB_HEAD_REF} | sed -E 's,/,-,g' + else + echo "tag=latest" + fi >> ${GITHUB_OUTPUT} + - uses: actions/checkout@v4 + + - uses: docker/setup-buildx-action@v3 + name: Set up Docker Buildx + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v6 + with: + push: true + tags: ghcr.io/${{ github.repository }}:${{ matrix.rhel }}-${{ steps.tag.outputs.tag }} + file: base-${{ matrix.rhel }}/Dockerfile + cache-from: type=gha + cache-to: type=gha,mode=max