Branch - Create Release #13
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
name: Branch - Create Release | |
on: | |
workflow_dispatch: | |
inputs: | |
majorMinorVersion: | |
description: 'Major.minor version (for example 18.0)' | |
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 | |
create-workflow-branch: | |
name: Create workflow branch | |
runs-on: ubuntu-latest | |
needs: [env] | |
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 main:release/${{ github.event.inputs.majorMinorVersion }} | |
working-directory: keycloak-rel | |
create-release-branches: | |
name: Create release branch | |
runs-on: ubuntu-latest | |
needs: [env] | |
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 }}' | |
ref: 'main' | |
token: ${{ secrets.GH_TOKEN }} | |
path: ${{ matrix.repository }} | |
- name: Push release branch | |
run: git push origin main:release/${{ github.event.inputs.majorMinorVersion }} | |
working-directory: ${{ matrix.repository }} |