Skip to content

Branch - Delete Release #10

Branch - Delete Release

Branch - Delete Release #10

Workflow file for this run

name: Branch - Delete Release
on:
workflow_dispatch:
inputs:
majorMinorVersion:
description: 'Major.minor version (for example 18.0)'
required: true
majorMinorVersionConfirmation:
description: 'Confirm major.minor version'
required: true
concurrency: rel-branches
defaults:
run:
shell: bash
jobs:
show-inputs:
runs-on: ubuntu-latest
steps:
- run: |
echo "Major.minor version: ${{ inputs.majorMinorVersion }} " >> $GITHUB_STEP_SUMMARY
env:
uses: ./.github/workflows/x-env.yml
delete-workflow-branch:
name: Delete workflow branch
runs-on: ubuntu-latest
needs: [env]
if: github.event.inputs.majorMinorVersion != 'main' && github.event.inputs.majorMinorVersion == github.event.inputs.majorMinorVersionConfirmation
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
path: keycloak-rel
ref: main
token: ${{ secrets.GH_TOKEN }}
- name: Push release branch
run: git push origin :release/${{ github.event.inputs.majorMinorVersion }}
working-directory: keycloak-rel
delete-release-branches:
name: Delete release branch
runs-on: ubuntu-latest
needs: [env]
if: github.event.inputs.majorMinorVersion != 'main' && github.event.inputs.majorMinorVersion == github.event.inputs.majorMinorVersionConfirmation
continue-on-error: true
strategy:
matrix:
repository:
- keycloak
- keycloak-nodejs-connect
- keycloak-quickstarts
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
repository: '${{ needs.env.outputs.gh-org }}/${{ matrix.repository }}'
token: ${{ secrets.GH_TOKEN }}
path: ${{ matrix.repository }}
- name: Delete release branch
run: git push origin :release/${{ github.event.inputs.majorMinorVersion }}
working-directory: ${{ matrix.repository }}