diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 79bd1e5de..83a26a26e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -30,8 +30,6 @@ on: required: true OCI_REGISTRY_PASSWORD: required: true - GH_DEVOPS_PAT: - required: true jobs: helm-chart-oci: runs-on: blacksmith-4vcpu-ubuntu-2404 @@ -54,33 +52,6 @@ jobs: - name: Publish Helm Chart run: ./.github/workflows/scripts/publish_helm_chart_oci.sh - helm-chart-commit: - runs-on: blacksmith-4vcpu-ubuntu-2404 - name: Helm chart commit - container: - image: python:3.12.11-bookworm - env: - IMAGE_VERSION_TAG: ${{ inputs.IMAGE_VERSION_TAG }} - steps: - - run: apt-get update -y - - run: apt-get install -y wget - - run: wget -qO /usr/local/bin/yq github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 - - run: chmod a+x /usr/local/bin/yq - - uses: actions/checkout@v4.2.2 - with: - fetch-depth: 0 - path: speckle - - uses: actions/checkout@v4.2.2 - with: - repository: specklesystems/helm - path: helm - token: ${{ secrets.GH_DEVOPS_PAT }} - - run: chmod +x ./.github/workflows/scripts/publish_helm_chart_commit.sh - working-directory: speckle - - name: Commit Helm Chart - run: ./.github/workflows/scripts/publish_helm_chart_commit.sh - working-directory: speckle - viewer-sandbox-cloudflare-pages: runs-on: blacksmith-4vcpu-ubuntu-2404 name: Viewer sandbox cloudflare pages diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 904696420..13b546557 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -88,7 +88,6 @@ jobs: DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }} CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} OCI_REGISTRY_PASSWORD: ${{ (github.repository == 'specklesystems/speckle-server') && secrets.DOCKERHUB_TOKEN || secrets.GITHUB_TOKEN }} - GH_DEVOPS_PAT: ${{ secrets.GH_DEVOPS_PAT }} #HACK temporary job to publish helm charts to ghcr.io until we migrate everything ghcr-helm-chart-oci: diff --git a/.github/workflows/scripts/publish_helm_chart_commit.sh b/.github/workflows/scripts/publish_helm_chart_commit.sh deleted file mode 100644 index 500d11033..000000000 --- a/.github/workflows/scripts/publish_helm_chart_commit.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env bash - -set -eo pipefail - -echo "🏷️ Setting envs" - -GIT_ROOT="$(git rev-parse --show-toplevel)" -GIT_HELM="$(dirname "$GIT_ROOT")/helm" -SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) -# shellcheck disable=SC1090,SC1091 -source "${SCRIPT_DIR}/common.sh" - -RELEASE_VERSION="${IMAGE_VERSION_TAG}" -HELM_STABLE_BRANCH="${HELM_STABLE_BRANCH:-"main"}" - - -if [[ -z "${RELEASE_VERSION}" ]]; then - echo "IMAGE_VERSION_TAG is not set: ${IMAGE_VERSION_TAG} ${RELEASE_VERSION}" - exit 1 -fi -if [ ! -d "${GIT_HELM}/.git" ]; then - echo "helm repo not found at ${GIT_HELM} " - exit 1 -fi -if [ ! -d "${GIT_ROOT}/.git" ]; then - echo "speckle repo not found at ${GIT_ROOT}" - exit 1 -fi - -echo "✏️ Editing Helm Chart version ${RELEASE_VERSION}" - -yq e -i ".version = \"${RELEASE_VERSION}\"" "${GIT_ROOT}/utils/helm/speckle-server/Chart.yaml" -yq e -i ".appVersion = \"${RELEASE_VERSION}\"" "${GIT_ROOT}/utils/helm/speckle-server/Chart.yaml" -yq e -i ".docker_image_tag = \"${RELEASE_VERSION}\"" "${GIT_ROOT}/utils/helm/speckle-server/values.yaml" - -if [[ "${GITHUB_REF}" == refs/tags/* || "${GITHUB_REF_NAME}" == "${HELM_STABLE_BRANCH}" ]]; then - rm -rf "${GIT_HELM}/charts/speckle-server" - cp -r "${GIT_ROOT}/utils/helm/speckle-server" "${GIT_HELM}/charts/speckle-server" -else - # overwrite the name of the chart - yq e -i ".name = \"speckle-server-branch-${BRANCH_NAME_TRUNCATED}\"" "${GIT_ROOT}/utils/helm/speckle-server/Chart.yaml" - rm -rf "${GIT_HELM}/charts/speckle-server-branch-${BRANCH_NAME_TRUNCATED}" - cp -r "${GIT_ROOT}/utils/helm/speckle-server" "${GIT_HELM}/charts/speckle-server-branch-${BRANCH_NAME_TRUNCATED}" -fi - -echo "💾 Pushing commit" - -cd "${GIT_HELM}" - -git add . -git -c user.email="devops+gha@speckle.systems" -c user.name="CI" commit -m "Github action commit for version '${RELEASE_VERSION}'" -git push