Skip to content

Promote of version 0.0.42 (build number 11) by philwebb to 'release' environment' #8

Promote of version 0.0.42 (build number 11) by philwebb to 'release' environment'

Promote of version 0.0.42 (build number 11) by philwebb to 'release' environment' #8

Workflow file for this run

name: Promote
run-name: >-
Promote of version ${{ inputs.version }} (build number ${{ inputs.build-number}}) by ${{ github.actor }} to '${{ inputs.environment }}' environment'
on:
workflow_call:
inputs:
environment:
type: string
required: true
version:
type: string
required: true
build-number:
type: string
required: true
workflow_dispatch:
inputs:
environment:
description: Environment
type: environment
required: true
version:
description: The version number to promote
type: string
required: true
build-number:
description: The build number to promote
type: string
required: true
jobs:
promote:
environment: ${{ inputs.environment }}
name: Promote
runs-on: ubuntu-latest
steps:
- name: Check Out
uses: actions/checkout@v4
- name: Set Up JFrog CLI
uses: jfrog/setup-jfrog-cli@7c95feb32008765e1b4e626b078dfd897c4340ad # v4.1.2
env:
JF_ENV_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}
- name: Download Release Artifacts
shell: bash
run: jf rt download --spec ./.github/artifacts.spec --spec-vars 'buildName=${{ format('spring-javaformat-{0}', inputs.version) }};buildNumber=${{ inputs.build-number }}'
- name: Check Sync Status
id: check-sync-status
run: |
url=${{ format('https://repo.maven.apache.org/maven2/io/spring/javaformat/spring-javaformat/{0}/spring-javaformat-{0}.pom', inputs.version) }}
status_code=$( curl --write-out '%{http_code}' --head --silent --output /dev/null ${url} )
if [ "${status_code}" != 200 ] && [ "${status_code}" != 404 ]; then
echo "Unexpected status code ${status_code}"
exit 1
fi
echo "status-code=${status_code}" >> $GITHUB_OUTPUT