Skip to content

Commit

Permalink
Add common/calling workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
kronn committed Oct 10, 2023
1 parent d7133b6 commit d14a617
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 1 deletion.
43 changes: 43 additions & 0 deletions .github/workflows/build-composition.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: 'Build composition repo'

on:
workflow_dispatch: # Allow triggering manually
inputs:
stage:
type: choice
description: "Stage of release to be built"
default: integration
required: true
options:
- integration
- production
# schedule:
# - cron: '24 2 * * *'

jobs:
settings:
uses: hitobito/hitobito/.github/workflows/stage-settings.yml@master
with:
repository: ${{ github.repository }}
stage: ${{ inputs.stage }}

version:
uses: hitobito/hitobito/.github/workflows/remote-version.yml@master
needs:
- settings
with:
repository_url: ${{ needs.settings.outputs.repo_url }}
stage: ${{ inputs.stage }}

build:
uses: hitobito/hitobito/.github/workflows/build-image.yml@master
needs:
- settings
- version
with:
composition: ${{ needs.settings.outputs.repo_name }}
source_ref: ${{ needs.settings.outputs.composition_branch }}
project: ${{ needs.settings.outputs.project }}
version: ${{ needs.version.outputs.version }}
stage: ${{ inputs.stage }}
secrets: inherit
13 changes: 12 additions & 1 deletion .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,22 @@ name: 'Prepare Release'

on:
workflow_dispatch: # Allow triggering manually
inputs:
stage:
type: choice
description: "Stage of release to be prepared"
default: integration
required: true
options:
- integration
- production

jobs:
prepare_release:
uses: hitobito/hitobito/.github/workflows/prepare-version.yml@master
with:
composition: ${{ github.event.repository.name }}
composition: ${{ github.repository }}
next_version: patch
stage: ${{ inputs.stage }}
# target_branch: master
secrets: inherit

0 comments on commit d14a617

Please sign in to comment.