From 12695c8fac64df2fa1f5c42d5f1143d723753cb5 Mon Sep 17 00:00:00 2001 From: Riley Dixon Date: Mon, 8 Jun 2026 19:22:59 -0600 Subject: [PATCH] do not commit - create rocky8 package --- .github/workflows/ais-ci.yml | 1 + .github/workflows/create-rocky8.yml | 56 +++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 .github/workflows/create-rocky8.yml diff --git a/.github/workflows/ais-ci.yml b/.github/workflows/ais-ci.yml index b323b741..4995c12e 100644 --- a/.github/workflows/ais-ci.yml +++ b/.github/workflows/ais-ci.yml @@ -15,6 +15,7 @@ permissions: packages: read jobs: AIS_CI_Pre-check: + if: false outputs: changed_dockerfile: ${{ steps.ci-flags.outputs.changed_dockerfile }} runs-on: [ubuntu-24.04] diff --git a/.github/workflows/create-rocky8.yml b/.github/workflows/create-rocky8.yml new file mode 100644 index 00000000..ab71f1e4 --- /dev/null +++ b/.github/workflows/create-rocky8.yml @@ -0,0 +1,56 @@ +name: hipFile GHCR create ais_ci_rocky8 (placeholder) + +on: + workflow_dispatch: + pull_request: + paths: + - '.github/workflows/create-rocky8.yml' + +permissions: + contents: read + packages: write + +env: + REGISTRY: ghcr.io + # Reclaims the hipfile/ais_ci_rocky8 namespace under the org that owns THIS repo. + # Run from ROCm/hipFile so the new package is access-linked there. + IMAGE: ${{ github.repository_owner }}/hipfile/ais_ci_rocky8 + TAG: hello-world + # Set to "true" to only build locally; "false" actually pushes (creates the package). + DRY_RUN: "false" + +jobs: + create: + runs-on: ubuntu-latest + steps: + - name: Build and push hello-world placeholder + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ACTOR: ${{ github.actor }} + REPO: ${{ github.repository }} + run: | + set -euo pipefail + IMAGE_REF="$(printf '%s/%s' "${REGISTRY}" "${IMAGE}" | tr '[:upper:]' '[:lower:]')" + SOURCE_URL="https://github.com/${REPO}" + echo "Target: ${IMAGE_REF}:${TAG} (source=${SOURCE_URL})" + + # Minimal inline 'hello-world' style image; no external Dockerfile needed. + printf '%s\n' \ + 'FROM busybox:latest' \ + 'CMD ["echo", "hello-world: hipFile ais_ci_rocky8 placeholder"]' \ + > Dockerfile.placeholder + + docker build \ + --label "org.opencontainers.image.source=${SOURCE_URL}" \ + --label "org.opencontainers.image.description=hipFile ais_ci_rocky8 placeholder to (re)claim the GHCR namespace" \ + -f Dockerfile.placeholder \ + -t "${IMAGE_REF}:${TAG}" . + + if [ "${DRY_RUN}" = "true" ]; then + echo "DRY_RUN=true -> built ${IMAGE_REF}:${TAG} but not pushing." + exit 0 + fi + + echo "${GH_TOKEN}" | docker login "${REGISTRY}" -u "${ACTOR}" --password-stdin + docker push "${IMAGE_REF}:${TAG}" + echo "Pushed ${IMAGE_REF}:${TAG}"