forked from StalemateInc/jira-release-action
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
supporting user input timezone for release date
- Loading branch information
1 parent
841f986
commit 9cb03d4
Showing
8 changed files
with
88 additions
and
33 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 |
---|---|---|
@@ -1,26 +1,58 @@ | ||
name: 🍺 sync | ||
name: 🍺 sync | ||
|
||
# Controls when the workflow will run | ||
on: | ||
# Triggers the workflow on push events but only for listed branches | ||
push: | ||
branches: [main] | ||
|
||
workflow_dispatch: | ||
|
||
# Controls when the workflow will run | ||
on: | ||
# Triggers the workflow on push events but only for listed branches | ||
push: | ||
branches: [main] | ||
|
||
# Cancel the current run if a new run is triggered | ||
concurrency: | ||
group: CI-${{ github.ref }}-1 | ||
cancel-in-progress: true | ||
# Cancel the current run if a new run is triggered | ||
concurrency: | ||
group: CI-${{ github.ref }}-1 | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
createPullRequest: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: create pull request | ||
jobs: | ||
createPullRequest: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: feature/melbourne-time-zone | ||
|
||
- name: Set git user | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "justin-jhg" | ||
- name: Merge Changes from Master to Melbourne Branch | ||
continue-on-error: true | ||
run: | | ||
git push origin --delete Melbourne | ||
git checkout -b Melbourne | ||
git push --set-upstream origin Melbourne | ||
git pull | ||
git merge -X theirs origin/main --allow-unrelated-histories --no-edit | ||
- name: Rebuild Melbourne Branch | ||
run: | | ||
git checkout -b syncFromMain | ||
git push --set-upstream origin syncFromMain | ||
gh pr create -B feature/melbourne-time-zone -H syncFromMain --title 'Merge main into melbourne-time-zone' --body 'Created by Github action' | ||
npm install all | ||
npm run all | ||
git add . | ||
git commit -m "Rebuild Melbourne branch" | ||
git push | ||
- name: Create Pull Request | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
gh pr create \ | ||
--title "merge changes into melbourne-time-zone" \ | ||
--body "This pull request was automatically created by a GitHub Action to merge the latest changes main branch" \ | ||
--base feature/melbourne-time-zone \ | ||
--head Melbourne |
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
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 |
---|---|---|
|
@@ -5,9 +5,9 @@ | |
|
||
This Github action connects your CI and your Jira instance by creating release(Fix Version) and assign Jira issues to the release as part of your CI process. | ||
|
||
- Create a JIRA release (Fix Version), release date will be today's date in UTC. | ||
- Assign JIRA Issue Key to the release (Fix Version) | ||
- Release can be created as archived as well | ||
- Create a JIRA release, release date supports timezone overwrite. | ||
- Assign JIRA Issues to release | ||
- Achive a JIRA release | ||
|
||
|
||
## Usage | ||
|
@@ -20,7 +20,7 @@ jobs: | |
name: Release Jira Fix Version | ||
runs-on: ubuntu-latest | ||
steps: | ||
uses: justin-jhg/jira-release-actions@v1.0 | ||
uses: justin-jhg/jira-release-actions@v1 | ||
with: | ||
jira_base_url: ${{ secrets.JIRA_BASE_URL }} | ||
jira_user_email: ${{ secrets.JIRA_USER_EMAIL }} | ||
|
@@ -30,6 +30,7 @@ jobs: | |
tickets: CI-123,CI-456 | ||
release: true | ||
archive: false | ||
time_zone: Australia/Melbourne | ||
``` | ||
---- | ||
|
@@ -45,6 +46,7 @@ jobs: | |
| jira_user_email | email of the user for which **Access Token** was created for . Example: `[email protected]` | Yes | String | | ||
| jira_project | Key of the jira project | Yes | String | | ||
| release_name | Name of the release (Fix Version) | Yes | String | | ||
| time_zone | timezone for release date to be set, e.g. Australia/Melbourne, default is UTC time | No | String | | ||
| release | Mark Jira fix version as released. Defaults to false. | No | Boolean | | ||
| archive | Mark Jira fix version as archived. Defaults to false. | No | Boolean | | ||
| tickets | Comma-separated list of Jira Issue Keys to include in the release. Defaults to ''. | No | String | | ||
|
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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
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