Skip to content

Commit

Permalink
Add release workflows and pull request template (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
labkey-tchad authored Feb 23, 2024
1 parent 1e26e07 commit 0910220
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#### Rationale
<!-- Rationale describing why this pull request is needed, what behavior it's adding/changing/removing, etc. (replace this comment) -->

#### Related Pull Requests
* <!-- list of links to related pull requests (replace this comment) -->

#### Changes
* <!-- list of descriptions of changes that are worth noting (replace this comment) -->
23 changes: 23 additions & 0 deletions .github/workflows/branch_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
# Workflow to automate creation and updating of release branches
name: Release Branching

# Trigger on tags created by TeamCity
on:
push:
tags:
- '*'

jobs:
branch_release:
if: github.event.created && github.event.sender.login == 'labkey-teamcity'
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Create branches and PRs
uses: LabKey/gitHubActions/branch-release@develop
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
28 changes: 28 additions & 0 deletions .github/workflows/merge_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
# Workflow to automate merging release branches
name: Release Merging

# Trigger on PR approval
on:
pull_request_review:
types:
- submitted

jobs:
merge_release:
if: >
github.event.review.state == 'approved' &&
github.event.pull_request.user.login == 'github-actions[bot]'
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Merge PR
uses: LabKey/gitHubActions/merge-release@develop
with:
target_branch: ${{ github.event.pull_request.base.ref }}
merge_branch: ${{ github.event.pull_request.head.ref }}
pr_number: ${{ github.event.pull_request.number }}
github_token: ${{ secrets.GITHUB_TOKEN }}
26 changes: 26 additions & 0 deletions .github/workflows/validate_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
# Workflow to validate Pull Request branches
name: PR Validation

# Trigger on PR creation
on:
pull_request:
types:
- opened
- reopened
- ready_for_review

jobs:
validate_pr:
if: github.event.pull_request.head.repo.owner.login == 'LabKey'
runs-on: ubuntu-latest

steps:
- name: Validate PR Branches
uses: LabKey/gitHubActions/validate-pr@develop
with:
pr_base: ${{ github.event.pull_request.base.ref }}
pr_head: ${{ github.event.pull_request.head.ref }}
pr_number: ${{ github.event.pull_request.number }}
pr_title: ${{ github.event.pull_request.title }}
github_token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 0910220

Please sign in to comment.