Skip to content

Commit

Permalink
update GitHub Actions workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
skin27 committed Sep 25, 2024
1 parent 05a0aef commit 050b9b5
Show file tree
Hide file tree
Showing 5 changed files with 125 additions and 53 deletions.
74 changes: 74 additions & 0 deletions .github/workflows/finalize-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Finalize Release (update versions and releases for all repositories)
# Run this task when the snapshots are merged into main

on:
workflow_dispatch:
inputs:
milestone:
description: 'Milestone to use as version'
type: string
required: true

workflow_call:
inputs:
milestone:
description: 'Milestone to use as version'
type: string
required: true

jobs:
call-base-update-version:
uses: assimbly/base/.github/workflows/update-version.yml@main
secrets: inherit
with:
milestone: "${{inputs.milestone}}"

call-base-release:
uses: assimbly/base/.github/workflows/release.yml@main
needs: call-base-update-version
secrets: inherit
with:
milestone: "${{inputs.milestone}}"

call-custom-components-update-version:
needs: call-base-release
uses: assimbly/custom-components/.github/workflows/update-version.yml@main
secrets: inherit
with:
milestone: "${{inputs.milestone}}"

call-custom-components-release:
uses: assimbly/custom-components/.github/workflows/release.yml@main
needs: call-custom-components-update-version
secrets: inherit
with:
milestone: "${{inputs.milestone}}"

call-runtime-update-version:
uses: assimbly/runtime/.github/workflows/update-version.yml@main
needs: call-custom-components-release
secrets: inherit
with:
milestone: "${{inputs.milestone}}"

call-runtime-release:
uses: assimbly/custom-components/.github/workflows/release.yml@main
needs: call-runtime-update-version
secrets: inherit
with:
milestone: "${{inputs.milestone}}"

call-gateway-update-version:
uses: ./.github/workflows/update-version.yml
needs: call-runtime-release
secrets: inherit
with:
milestone: "${{inputs.milestone}}"

call-gateway-release:
uses: ./.github/workflows/release-version.yml@main
needs: call-gateway-update-version
secrets: inherit
with:
milestone: "${{inputs.milestone}}"
tag: "${{inputs.milestone}}"
31 changes: 24 additions & 7 deletions .github/workflows/release-daily-develop-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,27 @@ on:
# - cron: '0 2 * * *'

jobs:
call-release:
uses: ./.github/workflows/release.yml
secrets: inherit
with:
branch: 'develop'
milestone: 'develop'
tag: 'development'

get-maven-version:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Extract Maven version from pom.xml
id: get_version
run: |
version=$(xmllint --xpath "//*[local-name()='project']/*[local-name()='version']/text()" pom.xml)
echo "Maven Version: $version"
echo "maven_version=$version" >> $GITHUB_ENV
- name: Use Maven version in subsequent step
run: echo "The extracted Maven version is ${{ env.maven_version }}"

#call-release:
#uses: ./.github/workflows/release.yml
#secrets: inherit
#with:
# branch: 'develop'
# milestone: 'develop'
# tag: 'development'
32 changes: 12 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,21 @@ name: Release
on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to use'
default: 'develop'
type: string
milestone:
description: 'Milestone to use as version'
default: 'develop'
type: string
required: true
tag:
description: 'Tag to use for this release'
default: 'develop'
type: string

workflow_call:
inputs:
branch:
description: 'Branch to use'
default: 'develop'
type: string
milestone:
description: 'Milestone to use as version'
default: 'develop'
type: string
required: true
tag:
description: 'Tag to use for this release'
default: 'develop'
Expand Down Expand Up @@ -61,39 +53,39 @@ jobs:
secrets: inherit
with:
module: 'full'
branch: "${{inputs.branch}}"
branch: ${{ github.ref_name }}

call-integration-release-jars:
needs: delete_old_snapshots
uses: ./.github/workflows/release-jars.yml
secrets: inherit
with:
module: 'integration'
branch: "${{inputs.branch}}"
branch: ${{ github.ref_name }}

call-broker-release-jars:
needs: delete_old_snapshots
uses: ./.github/workflows/release-jars.yml
secrets: inherit
with:
module: 'broker'
branch: "${{inputs.branch}}"
branch: ${{ github.ref_name }}

call-headless-release-jars:
needs: delete_old_snapshots
uses: ./.github/workflows/release-jars.yml
secrets: inherit
with:
module: 'headless'
branch: "${{inputs.branch}}"
branch: ${{ github.ref_name }}

call-full-release-dockerhub-image:
needs: delete_old_snapshots
uses: ./.github/workflows/release-dockerhub-images.yml
secrets: inherit
with:
module: 'full'
branch: "${{inputs.branch}}"
branch: ${{ github.ref_name }}
tag: "${{inputs.tag}}"
type: 'full'

Expand All @@ -103,7 +95,7 @@ jobs:
secrets: inherit
with:
module: 'integration'
branch: "${{inputs.branch}}"
branch: ${{ github.ref_name }}
tag: "${{inputs.tag}}"
type: 'default'

Expand All @@ -113,7 +105,7 @@ jobs:
secrets: inherit
with:
module: 'broker'
branch: "${{inputs.branch}}"
branch: ${{ github.ref_name }}
tag: "${{inputs.tag}}"
type: 'default'

Expand All @@ -123,7 +115,7 @@ jobs:
secrets: inherit
with:
module: 'headless'
branch: "${{inputs.branch}}"
branch: ${{ github.ref_name }}
tag: "${{inputs.tag}}"
type: 'full'

Expand All @@ -133,7 +125,7 @@ jobs:
secrets: inherit
with:
module: 'headless'
branch: "${{inputs.branch}}"
branch: ${{ github.ref_name }}
tag: "${{inputs.tag}}"
type: 'full'

Expand All @@ -143,7 +135,7 @@ jobs:
secrets: inherit
with:
module: 'broker'
branch: "${{inputs.branch}}"
branch: ${{ github.ref_name }}
tag: "${{inputs.tag}}"
type: 'default'

Expand Down
27 changes: 11 additions & 16 deletions .github/workflows/start-new-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,49 +3,44 @@ name: Start New Release (update versions for all repositories)
on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to use'
default: 'develop'
type: string
milestone:
description: 'Milestone to use as version'
type: string
required: true

workflow_call:
inputs:
branch:
description: 'Branch to use'
default: 'develop'
type: string
milestone:
description: 'Milestone to use as version'
type: string
required: true

jobs:
call-gateway-update-version:
uses: ./.github/workflows/update-version.yml
secrets: inherit
with:
branch: "${{ inputs.branch }}"
branch: ${{ github.ref_name }}
milestone: "${{inputs.milestone}}-SNAPSHOT"

call-base-release-version:
uses: assimbly/base/.github/workflows/update-version.yml@develop
secrets: inherit
with:
branch: "${{ inputs.branch }}"
branch: ${{ github.ref_name }}
milestone: "${{inputs.milestone}}-SNAPSHOT"

call-runtime-release-version:
uses: assimbly/runtime/.github/workflows/update-version.yml@develop
call-custom-components-release-version:
uses: assimbly/custom-components/.github/workflows/update-version.yml@develop
secrets: inherit
with:
branch: "${{ inputs.branch }}"
branch: ${{ github.ref_name }}
milestone: "${{inputs.milestone}}-SNAPSHOT"

call-custom-components-release-version:
uses: assimbly/custom-components/.github/workflows/update-version.yml@develop
call-runtime-release-version:
uses: assimbly/runtime/.github/workflows/update-version.yml@develop
secrets: inherit
with:
branch: "${{ inputs.branch }}"
branch: ${{ github.ref_name }}
milestone: "${{inputs.milestone}}-SNAPSHOT"

14 changes: 4 additions & 10 deletions .github/workflows/update-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,17 @@ name: Update Version Number
on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to use'
default: 'develop'
type: string
milestone:
description: 'Milestone to use as version'
type: string
required: true

workflow_call:
inputs:
branch:
description: 'Branch to use'
default: 'develop'
type: string
milestone:
description: 'Milestone to use as version'
type: string
required: true

jobs:
update_version:
Expand All @@ -28,8 +22,8 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
repository: assimbly/gateway
ref: ${{ inputs.branch }}
repository: ${{ github.repository }}
ref: ${{ github.ref_name }}

- name: Update Gradle Version
run: |
Expand Down

0 comments on commit 050b9b5

Please sign in to comment.