From d14a617c129372205597802a8ff980f9175628c1 Mon Sep 17 00:00:00 2001 From: Matthias Viehweger Date: Tue, 10 Oct 2023 23:02:35 +0200 Subject: [PATCH] Add common/calling workflows --- .github/workflows/build-composition.yml | 43 +++++++++++++++++++++++++ .github/workflows/prepare-release.yml | 13 +++++++- 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build-composition.yml diff --git a/.github/workflows/build-composition.yml b/.github/workflows/build-composition.yml new file mode 100644 index 0000000..04d9a7f --- /dev/null +++ b/.github/workflows/build-composition.yml @@ -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 diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml index 6b815a4..4126654 100644 --- a/.github/workflows/prepare-release.yml +++ b/.github/workflows/prepare-release.yml @@ -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