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

arm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-actions.git


The following commit(s) were added to refs/heads/main by this push:
     new f1bb9e3  Rename test distribution to maven as first target
f1bb9e3 is described below

commit f1bb9e363e4fe8754102f5219d463d7b2559418b
Author: Alastair McFarlane <[email protected]>
AuthorDate: Tue Jan 13 09:53:55 2026 +0000

    Rename test distribution to maven as first target
---
 .github/workflows/distribute-maven.yml | 117 +++++++++++++++++++++++++++++++++
 .github/workflows/distribute-test.yml  |  53 ---------------
 2 files changed, 117 insertions(+), 53 deletions(-)

diff --git a/.github/workflows/distribute-maven.yml 
b/.github/workflows/distribute-maven.yml
new file mode 100644
index 0000000..d15093a
--- /dev/null
+++ b/.github/workflows/distribute-maven.yml
@@ -0,0 +1,117 @@
+# 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.
+
+name: Distribute from ATR to Maven
+run-name: "${{ inputs.atr-id }}"
+
+on:
+  workflow_dispatch:
+    inputs:
+      atr-id:
+        description: 'Run ID (from ATR)'
+        required: true
+      project:
+        description: 'Project in ATR to pull files from'
+        required: true
+      version:
+        description: 'Version in ATR to pull files from'
+        required: true
+      distribution-owner-namespace:
+        description: "Owner namespace"
+        required: true
+      distribution-package:
+        description: 'Package/project name in ATR'
+        required: true
+      distribution-version:
+        description: 'Distribution version'
+        required: true
+      staging:
+        description: 'Use staging (true or false)'
+        required: false
+        default: 'false'
+
+jobs:
+  upload:
+    permissions:
+      id-token: write
+      contents: read
+    runs-on: ubuntu-latest
+    env:
+      ATR_HOST: release-test.apache.org
+    steps:
+    - name: Create a GitHub OIDC JWT
+      id: create-github-jwt
+      shell: bash
+      run: |
+        set -euo pipefail
+        url="${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=atr-test-v1"
+        jwt="$(curl -sS --fail-with-body -H "Authorization: bearer 
${ACTIONS_ID_TOKEN_REQUEST_TOKEN}" "$url" | jq -r .value)"
+        echo "::add-mask::$jwt"
+        echo "jwt=$jwt" >> "$GITHUB_OUTPUT"
+
+    - name: Generate an ephemeral SSH key
+      id: generate-ssh-key
+      shell: bash
+      run: |
+        set -euxo pipefail
+        ssh-keygen -t ed25519 -N "" -f "$RUNNER_TEMP/ssh_key"
+        echo "ssh_private_key_path=$RUNNER_TEMP/ssh_key" >> "$GITHUB_OUTPUT"
+        echo "ssh_public_key=$(cat "$RUNNER_TEMP/ssh_key.pub")" >> 
"$GITHUB_OUTPUT"
+
+    - name: Register the ephemeral SSH key with ATR
+      shell: bash
+      run: |
+        set -euxo pipefail
+        case "${ATR_HOST}" in
+          *.apache.org) ;;
+          *) echo "atr-host must match *.apache.org"; exit 1;;
+        esac
+        jq -n --arg publisher github \
+              --arg jwt "$JWT" \
+              --arg key "$SSH_PUBLIC_KEY" \
+              '{publisher:$publisher, jwt:$jwt, ssh_key:$key}' |
+          curl -sS --fail-with-body -X POST -H 'Content-Type: 
application/json' -d @- \
+            "https://${ATR_HOST}/api/publisher/ssh/register";
+      env:
+        JWT: ${{ steps.create-github-jwt.outputs.jwt }}
+        SSH_PUBLIC_KEY: ${{ steps.generate-ssh-key.outputs.ssh_public_key }}
+
+    - name: Download from ATR using rsync
+      shell: bash
+      run: |
+        set -euxo pipefail
+        if ! [[ "${INPUTS_SSH_PORT}" =~ ^[0-9]+$ ]]
+        then
+          echo "::error::ssh-port must be an integer"
+          exit 1
+        fi
+        : "${INPUTS_DISTRIBUTION_PACKAGE:?package is required}"
+        : "${INPUTS_VERSION:?version is required}"
+        command -v rsync > /dev/null || { sudo apt-get update -y && sudo 
apt-get install -y rsync; }
+        mkdir stg
+        rsync -av \
+          -e "ssh -p 2222 -i $SSH_PRIVATE_KEY_PATH -o 
StrictHostKeyChecking=accept-new" \
+          -- \
+          "github@${ATR_HOST}:/${INPUTS_PROJECT}/${INPUTS_VERSION}/" ./stg/
+      env:
+        INPUTS_PROJECT: ${{ inputs.project }}
+        INPUTS_VERSION: ${{ inputs.version }}
+        INPUTS_DISTRIBUTION_OWNER_NAMESPACE: ${{ 
inputs.distribution-owner-namespace }}
+        INPUTS_DISTRIBUTION_PACKAGE: ${{ inputs.distribution-package }}
+        INPUTS_STAGING: ${{ inputs.staging }}
+        # INPUTS_DETAILS: ${{ inputs.details }}
+        SSH_PRIVATE_KEY_PATH: ${{ 
steps.generate-ssh-key.outputs.ssh_private_key_path }}
diff --git a/.github/workflows/distribute-test.yml 
b/.github/workflows/distribute-test.yml
deleted file mode 100644
index 1bd2d1b..0000000
--- a/.github/workflows/distribute-test.yml
+++ /dev/null
@@ -1,53 +0,0 @@
-# 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.
-
-name: Distribute from ATR
-run-name: "${{ inputs.atr-id }}"
-
-on:
-  workflow_dispatch:
-    inputs:
-      atr-id:
-        description: 'Run ID (from ATR)'
-        required: true
-      platform:
-        description: 'Distribution platform'
-        required: true
-      distribution-package:
-        description: 'Package/project name in ATR'
-        required: true
-      version:
-        description: 'Version in ATR to pull files from'
-        required: true
-      distribution-version:
-        description: 'Distribution version'
-        required: true
-
-jobs:
-  upload:
-    permissions:
-      id-token: write
-      contents: read
-    runs-on: ubuntu-latest
-    steps:
-      - name: Distribute from ATR
-        uses: 
apache/tooling-actions/atr-distribute-test@da8b238137453a21eb3e93192b8aff73e9ce68e4
-        with:
-          platform: ${{ inputs.platform }}
-          distribution-package: ${{ inputs.distribution-package }}
-          version: ${{ inputs.version }}
-          distribution-version: ${{ inputs.distribution-version }}


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to