This is an automated email from the ASF dual-hosted git repository.

lewismc pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tika-helm.git


The following commit(s) were added to refs/heads/main by this push:
     new 41d5c89  TIKA-4678 Create GitHub Action automation to publish 
tika-helm to Artfactory on each merge to main branch (#35)
41d5c89 is described below

commit 41d5c89c9e9c9ff5a58329c76b299dd93229e303
Author: Lewis John McGibbney <[email protected]>
AuthorDate: Fri Apr 3 17:34:55 2026 -0700

    TIKA-4678 Create GitHub Action automation to publish tika-helm to 
Artfactory on each merge to main branch (#35)
---
 .github/actions/setup-jfrog-cli-manual/action.yml  | 85 ++++++++++++++++++++++
 .../workflows/publish-artifactory-on-merge.yaml    | 11 ++-
 .github/workflows/release.yaml                     | 12 ++-
 3 files changed, 100 insertions(+), 8 deletions(-)

diff --git a/.github/actions/setup-jfrog-cli-manual/action.yml 
b/.github/actions/setup-jfrog-cli-manual/action.yml
new file mode 100644
index 0000000..a5029ff
--- /dev/null
+++ b/.github/actions/setup-jfrog-cli-manual/action.yml
@@ -0,0 +1,85 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Composite action: install JFrog CLI without jfrog/setup-jfrog-cli (not on ASF
+# approved_patterns.yml). Release versions are listed at:
+#   https://github.com/jfrog/jfrog-cli/releases
+# Use the semver from a tag (e.g. v2.92.0 → input 2.92.0). The Linux amd64
+# binary is fetched from releases.jfrog.io using the same path layout as the
+# official install script (https://install-cli.jfrog.io).
+# Binary is cached via actions/cache when the cache hits.
+
+name: Setup JFrog CLI (manual + cache)
+description: Install JFrog CLI (version from GitHub releases); download via 
JFrog CDN; cache; configure credentials.
+
+inputs:
+  jfrog-url:
+    description: JFrog Platform base URL (e.g. https://apache.jfrog.io)
+    required: true
+  version:
+    description: 'JFrog CLI semver matching a release at 
https://github.com/jfrog/jfrog-cli/releases (e.g. 2.92.0 for tag v2.92.0)'
+    required: false
+    default: '2.98.0'
+  server-id:
+    description: Server ID stored in jf config
+    required: false
+    default: 'apache'
+
+runs:
+  using: composite
+  steps:
+    - name: Cache JFrog CLI
+      id: jf-cli-cache
+      uses: actions/cache@v5
+      with:
+        path: ${{ github.workspace }}/.jfrog-cli-cache/jf
+        key: jfrog-cli-${{ inputs.version }}-linux-amd64
+
+    - name: Download JFrog CLI
+      if: steps.jf-cli-cache.outputs.cache-hit != 'true'
+      shell: bash
+      run: |
+        set -euo pipefail
+        mkdir -p "${GITHUB_WORKSPACE}/.jfrog-cli-cache"
+        # Version must exist on https://github.com/jfrog/jfrog-cli/releases ; 
binary CDN matches install-cli.jfrog.io
+        curl -fsSL \
+          "https://releases.jfrog.io/artifactory/jfrog-cli/v2-jf/${{ 
inputs.version }}/jfrog-cli-linux-amd64/jf" \
+          -o "${GITHUB_WORKSPACE}/.jfrog-cli-cache/jf"
+        chmod +x "${GITHUB_WORKSPACE}/.jfrog-cli-cache/jf"
+
+    - name: Ensure JFrog CLI is executable
+      shell: bash
+      run: chmod +x "${GITHUB_WORKSPACE}/.jfrog-cli-cache/jf"
+
+    - name: Add JFrog CLI to PATH
+      shell: bash
+      run: echo "${GITHUB_WORKSPACE}/.jfrog-cli-cache" >> "$GITHUB_PATH"
+
+    - name: Configure JFrog CLI
+      shell: bash
+      env:
+        JF_URL: ${{ inputs.jfrog-url }}
+        ARTIFACTORY_USERNAME: ${{ env.ARTIFACTORY_USERNAME }}
+        ARTIFACTORY_PASSWORD: ${{ env.ARTIFACTORY_PASSWORD }}
+      run: |
+        set -euo pipefail
+        jf config add "${{ inputs.server-id }}" \
+          --url="${JF_URL}" \
+          --user="${ARTIFACTORY_USERNAME}" \
+          --password="${ARTIFACTORY_PASSWORD}" \
+          --interactive=false \
+          --overwrite=true \
+          --basic-auth-only
+        jf config use "${{ inputs.server-id }}"
diff --git a/.github/workflows/publish-artifactory-on-merge.yaml 
b/.github/workflows/publish-artifactory-on-merge.yaml
index 005f12b..0654448 100644
--- a/.github/workflows/publish-artifactory-on-merge.yaml
+++ b/.github/workflows/publish-artifactory-on-merge.yaml
@@ -25,6 +25,8 @@
 #   ARTIFACTORY_PASSWORD -- Apache JFrog Artifactory password
 #
 # Prerequisite: Helm OCI repo and project match release.yaml (HELM_OCI_REPO, 
JF_PROJECT_KEY).
+#
+# JFrog CLI is installed via .github/actions/setup-jfrog-cli-manual (see 
release.yaml).
 
 name: Publish Helm Chart to Artifactory on Merge
 
@@ -81,12 +83,13 @@ jobs:
         uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2
 
       - name: Set up JFrog CLI
-        uses: jfrog/setup-jfrog-cli@v4
+        uses: ./.github/actions/setup-jfrog-cli-manual
         with:
-          version: 2.92.0
           jfrog-url: ${{ env.JF_URL }}
-          jfrog-username: ${{ secrets.ARTIFACTORY_USERNAME }}
-          jfrog-password: ${{ secrets.ARTIFACTORY_PASSWORD }}
+          version: '2.92.0'
+        env:
+          ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
+          ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
 
       - name: Package Helm chart
         run: helm package .
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index ae6e0cf..147be90 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -26,6 +26,9 @@
 #
 # Prerequisite: The Helm OCI repository must exist in Apache JFrog (Tika 
project), e.g. tika-helm.
 # Confirm the repo key and project with Apache Infra and set HELM_OCI_REPO / 
JF_PROJECT_KEY if different.
+#
+# JFrog CLI is installed via .github/actions/setup-jfrog-cli-manual (cached 
download from
+# releases.jfrog.io) because jfrog/setup-jfrog-cli is not in ASF 
approved_patterns.yml.
 
 name: Release Helm Chart
 
@@ -86,12 +89,13 @@ jobs:
         uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2
 
       - name: Set up JFrog CLI
-        uses: jfrog/setup-jfrog-cli@v4
+        uses: ./.github/actions/setup-jfrog-cli-manual
         with:
-          version: 2.92.0
           jfrog-url: ${{ env.JF_URL }}
-          jfrog-username: ${{ secrets.ARTIFACTORY_USERNAME }}
-          jfrog-password: ${{ secrets.ARTIFACTORY_PASSWORD }}
+          version: '2.92.0'
+        env:
+          ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
+          ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
 
       - name: Package Helm chart
         run: helm package . --version ${{ steps.versions.outputs.chart_version 
}}

Reply via email to