Skip to content

Promote to Stage

Promote to Stage #14

name: Promote to Stage
permissions:
# This is required for requesting the OIDC token
id-token: write
on:
workflow_dispatch:
inputs:
build-number:
type: number
description: Build number used to build artifact to be promoted
jobs:
validate-build:
runs-on: ubuntu-latest
steps:
- name: Setup jfrog shell
uses: jfrog/setup-jfrog-cli@v4
env:
JF_URL: ${{ vars.JFROG_PLATFORM_URL }}
with:
oidc-provider-name: ${{ secrets.JFROG_OIDC_PROVIDER }}
oidc-audience: ${{ secrets.JFROG_OIDC_AUDIENCE }}
- name: Get info
id: get-build-info
run: |
echo build-info=$(jf rt curl /api/build/clients-java-push-to-dev/${{ inputs.build-number }}) >> $GITHUB_OUTPUT
- name: Get commit hash from repo
id: get-commit-hash
run: |
echo commit-hash=$(echo '${{ steps.get-build-info.outputs.build-info }}' | jq -r '.buildInfo.vcs[].revision') >> $GITHUB_OUTPUT
- name: Get build name
id: get-build-name
run: |
echo build-name=$(echo '${{ steps.get-build-info.outputs.build-info }}' | jq -r '.buildInfo.name') >> $GITHUB_OUTPUT
- name: Debug
run: |
echo "commit-hash: ${{ steps.get-commit-hash.outputs.commit-hash }}"
echo "build-name: ${{ steps.get-build-name.outputs.build-name }}"
echo "build-number: ${{ steps.get-build-info.outputs.build-info }}"