-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
See gh-
- Loading branch information
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Rollback | ||
run-name: >- | ||
Rollback of version ${{ inputs.version }} (build number ${{ inputs.build-number}}) by ${{ github.actor }} | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
environment: | ||
description: Environment | ||
type: environment | ||
required: true | ||
version: | ||
description: The version number to roll back | ||
type: string | ||
required: true | ||
build-number: | ||
description: The build number to roll back | ||
type: string | ||
required: true | ||
jobs: | ||
rollback: | ||
environment: ${{ inputs.environment }} | ||
name: Roll Back | ||
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: Delete Staged Artifacts | ||
run: | | ||
url=${{ format('libs-staging-local/io/spring/javaformat/spring-javaformat/{0}/spring-javaformat-{0}.pom', inputs.version) }} | ||
artifact_count=$( jf rt s ${url} --count ) | ||
if [ "${artifact_count}" != 1 ]; then | ||
echo "Unexpected aretifact count ${artifact_count}" | ||
exit 1 | ||
fi | ||
build-name=${{ format('spring-javaformat-{0}', inputs.version)}} | ||
build-number=${{ inputs.build-number }} | ||
jf rt delete --dry-run --build ${build-name}/${build-number} |