Skip to content

Commit

Permalink
Update cd workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
c3p0-maif committed Sep 24, 2024
1 parent ededa04 commit 1ee70e3
Showing 1 changed file with 35 additions and 1 deletion.
36 changes: 35 additions & 1 deletion .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,25 @@
# Note: additional setup is required, see https://www.jenkins.io/redirect/continuous-delivery-of-plugins

#
# Please find additional hints for individual trigger use case
# configuration options inline this script below.
#
name: cd
on:
workflow_dispatch:
inputs:
validate_only:
required: false
type: boolean
description: |
Run validation with release drafter only
→ Skip the release job
# Note: Change this default to true,
# if the checkbox should be checked by default.
default: false
# If you don't want any automatic trigger in general, then
# the following check_run trigger lines should all be commented.
# Note: Consider the use case #2 config for 'validate_only' below
# as an alternative option!
check_run:
types:
- completed
Expand All @@ -14,6 +31,23 @@ permissions:
jobs:
maven-cd:
uses: jenkins-infra/github-reusable-workflows/.github/workflows/maven-cd.yml@v1
with:
# Comment / uncomment the validate_only config appropriate to your preference:
#
# Use case #1 (automatic release):
# - Let any successful Jenkins build trigger another release,
# if there are merged pull requests of interest
# - Perform a validation only run with drafting a release note,
# if manually triggered AND inputs.validate_only has been checked.
#
#validate_only: ${{ inputs.validate_only == true }}
#
# Alternative use case #2 (no automatic release):
# - Same as use case #1 - but:
# - Let any check_run trigger a validate_only run.
# => enforce the release job to be skipped.
#
validate_only: ${{ inputs.validate_only == true || github.event_name == 'check_run' }}
secrets:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }}

0 comments on commit 1ee70e3

Please sign in to comment.