Skip to content

Commit

Permalink
Merge pull request #134 from assimbly/workflows
Browse files Browse the repository at this point in the history
Added delete-packages workflow
  • Loading branch information
joaocatalao authored Jun 19, 2023
2 parents 730382b + f0bce5d commit 711fb4e
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/delete-packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Delete Packages

on:
workflow_dispatch:
inputs:
VERSION:
description: 'Version to delete'
required: true
default: '4.0.0'
is_SNAPSHOT:
description: 'Set to true to delete snapshots'
required: true
default: false
type: boolean

jobs:
delete_base_packages:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:

- name: Checkout the code
uses: actions/checkout@v3

- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'

- name: Check version to delete
id: check_version
run: |
if ${{ inputs.is_SNAPSHOT }} == 'true'; then
echo "Version: ${{ inputs.VERSION }}"
echo "VERSION_TO_DELETE=${{ inputs.VERSION }}-SNAPSHOT" >> "$GITHUB_OUTPUT"
else
echo "Version: ${{ inputs.VERSION }}"
echo "VERSION_TO_DELETE=${{ inputs.VERSION }}" >> "$GITHUB_OUTPUT"
fi
- name: Print version
run: |
echo "Version to delete: ${{ steps.check_version.outputs.VERSION_TO_DELETE }}"
- name: Delete packages
uses: smartsquaregmbh/delete-old-packages@v0.7.0
with:
organization: assimbly
type: maven
keep: 0
version-pattern: "^${{ steps.check_version.outputs.VERSION_TO_DELETE }}$"
names: |
org.assimbly.runtime
org.assimbly.broker-rest
org.assimbly.broker
org.assimbly.dil
org.assimbly.integration
org.assimbly.integration-rest

0 comments on commit 711fb4e

Please sign in to comment.