-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Made the github repository be taken as input
It used to be given to the action as an environment variable
- Loading branch information
1 parent
948b52b
commit 9034330
Showing
1 changed file
with
15 additions
and
9 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,43 +4,47 @@ author: 'Ahmed Khaled [email protected]' | |
|
||
inputs: | ||
action-type: | ||
description: 'Type of action to perform (release or pr)' | ||
description: "Type of action to perform (release or pr)" | ||
required: true | ||
default: 'release' | ||
type: choice | ||
options: | ||
- release | ||
- pr | ||
new-release-tag: | ||
description: 'Tag name of the new release' | ||
description: "Tag name of the new release" | ||
required: false | ||
type: string | ||
previous-release-reference: | ||
description: 'Tag name of the previous release or commit SHA right before the first commit in the new release' | ||
description: "Tag name of the previous release or commit SHA right before the first commit in the new release" | ||
required: false | ||
type: string | ||
release-notes-source: | ||
description: 'Release Notes Source' | ||
description: "Release Notes Source" | ||
required: false | ||
default: 'Pull Requests' | ||
type: choice | ||
options: | ||
- Commit Messages | ||
- Pull Requests | ||
pr-release-notes-mode: | ||
description: 'Release Notes Mode (only affects release notes generation if you chose source as Pull Requests)' | ||
description: "Release Notes Mode (only affects release notes generation if you chose source as Pull Requests)" | ||
required: false | ||
default: 'Full' | ||
type: choice | ||
options: | ||
- Short | ||
- Full | ||
pull-request-number: | ||
description: 'Pull Request Number' | ||
description: "Pull Request Number" | ||
required: false | ||
type: string | ||
pull-request-trigger-event: | ||
description: 'Event that triggered the workflow when type is pr' | ||
description: "Event that triggered the workflow when type is pr" | ||
required: false | ||
type: string | ||
github-repository: | ||
description: "The GitHub repository to use to get the pull requests' info, in the form owner/repo" | ||
required: false | ||
type: string | ||
|
||
|
@@ -125,7 +129,8 @@ runs: | |
PREVIOUS_RELEASE_REFERENCE: ${{ inputs.previous-release-reference }} | ||
NEW_RELEASE_REFERENCE: ${{ steps.get-new-release-git-reference.outputs.NEW_RELEASE_REFERENCE }} | ||
RELEASE_NOTES_MODE: ${{ inputs.pr-release-notes-mode }} | ||
run: ./release_notes_generator "$RELEASE_NOTES_SOURCE" "$PREVIOUS_RELEASE_REFERENCE" "$NEW_RELEASE_REFERENCE" "$GH_TOKEN" "$RELEASE_NOTES_MODE" "$GITHUB_REPOSITORY" | ||
REPOSITORY: ${{ inputs.github-repository }} | ||
run: ./release_notes_generator "$RELEASE_NOTES_SOURCE" "$PREVIOUS_RELEASE_REFERENCE" "$NEW_RELEASE_REFERENCE" "$GH_TOKEN" "$RELEASE_NOTES_MODE" "$REPOSITORY" | ||
shell: bash | ||
|
||
# GitHub's cli tool "gh" automatically uses the GITHUB_TOKEN environment variable | ||
|
@@ -159,7 +164,8 @@ runs: | |
if: ${{ inputs.action-type == 'pr' }} | ||
env: | ||
PULL_REQUEST_NUMBER: ${{ inputs.pull-request-number }} | ||
run: ./release_notes_generator single_pr "$PULL_REQUEST_NUMBER" "$GH_TOKEN" "$GITHUB_REPOSITORY" | ||
REPOSITORY: ${{ inputs.github-repository }} | ||
run: ./release_notes_generator single_pr "$PULL_REQUEST_NUMBER" "$GH_TOKEN" "$REPOSITORY" | ||
shell: bash | ||
|
||
- name: Set extra comment message based on the trigger event type | ||
|