Skip to content

Commit

Permalink
🔄 synced file(s) with neurobagel/workflows (#52)
Browse files Browse the repository at this point in the history
* 🔄 synced local '.github/workflows/' with remote 'template_workflows/project_automation/'

* 🔄 created local '.github/workflows/release.yaml' from remote 'template_workflows/auto_release/release.yaml'

* 🔄 created local '.autorc' from remote 'template_configs/.autorc'

* 🔄 created local '.github/pull_request_template.md' from remote 'template_prs/auto_release_repo_pr.md'

* 🔄 created local '.github/workflows/build_docker_on_release.yml' from remote 'template_workflows/auto_release/build_docker_on_release.yml'

* Formatted files

---------

Co-authored-by: surchs <null>
Co-authored-by: rmanaem <[email protected]>
  • Loading branch information
surchs and rmanaem authored Mar 7, 2024
1 parent 6d61865 commit cac110a
Show file tree
Hide file tree
Showing 6 changed files with 259 additions and 0 deletions.
118 changes: 118 additions & 0 deletions .autorc
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
{
"onlyPublishWithReleaseLabel": true,
"noDefaultLabels": true,
"baseBranch": "main",
"author": "Chef Bot <[email protected]>",
"noVersionPrefix": false,
"plugins": [
"git-tag",
"released",
"protected-branch",
"first-time-contributor",
[
"omit-commits",
{
"username": "dependabot[bot]",
"subject": "[pre-commit.ci]",
"labels": "_bot"
}
]
],
"labels": [
{
"name": "pr-major-breaking",
"changelogTitle": "💥 Breaking Changes",
"description": "Significant behaviour change that breaks compatibility, will increment major version (+1.0.0)",
"releaseType": "major",
"overwrite": true,
"color": "#C5000B"
},
{
"name": "pr-minor-breaking",
"changelogTitle": "💥 Breaking Changes",
"description": "Feature or enhancement that breaks compatibility, will increment minor version (0.+1.0)",
"releaseType": "minor",
"overwrite": true,
"color": "#F1A60E"
},
{
"name": "pr-minor",
"changelogTitle": "🚀 Enhancements",
"description": "Non-breaking feature or enhancement, will increment minor version (0.+1.0)",
"releaseType": "minor",
"overwrite": true,
"color": "#F1A60E"
},
{
"name": "pr-patch",
"changelogTitle": "🚀 Enhancements",
"description": "Incremental feature improvement, will increment patch version when merged (0.0.+1)",
"releaseType": "patch",
"overwrite": true,
"default": true,
"color": "#870048"
},
{
"name": "pr-bug-fix",
"changelogTitle": "🐛 Bug Fixes",
"description": "Bug fix, will increment patch version when merged (0.0.+1)",
"releaseType": "patch",
"overwrite": true,
"color": "#870048"
},
{
"name": "pr-internal",
"changelogTitle": "🏠 Internal",
"description": "Non-user-facing code improvement, will increment patch version when merged (0.0.+1)",
"releaseType": "patch",
"overwrite": true,
"color": "#696969"
},
{
"name": "pr-performance",
"changelogTitle": "🏎 Performance Improvements",
"description": "Improve performance of an existing feature, will increment patch version when merged (0.0.+1)",
"releaseType": "patch",
"overwrite": true,
"color": "#f4b2d8"
},
{
"name": "pr-documentation",
"changelogTitle": "📝 Documentation",
"description": "Change that only affects user documentation",
"releaseType": "none",
"overwrite": true,
"color": "#cfd3d7"
},
{
"name": "pr-tests",
"changelogTitle": " 🧪 Tests",
"description": "Add or improve existing tests",
"releaseType": "none",
"overwrite": true,
"color": "#ffd3cc"
},
{
"name": "pr-dependencies",
"changelogTitle": "🔩 Dependency Updates",
"description": "Update one or more dependencies version",
"releaseType": "none",
"overwrite": true,
"color": "#8732bc"
},
{
"name": "skip-release",
"description": "PR doesn't appear in the changelog and preserves current version when merged",
"releaseType": "skip",
"overwrite": true,
"color": "#bf5416"
},
{
"name": "release",
"description": "Create a release when this PR is merged",
"releaseType": "release",
"overwrite": true,
"color": "#007f70"
}
]
}
47 changes: 47 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<!--- Until this PR is ready for review, you can include [WIP] in the title, or create a draft PR. -->

<!---
Below is a suggested pull request template. Feel free to add more details you feel are relevant/necessary.
For more info on the Neurobagel PR process and other contributing guidelines, see https://neurobagel.org/contributing/CONTRIBUTING/.
-->

<!--
Please indicate after the # which issue you're closing with this PR, if applicable.
If the PR closes multiple issues, include "closes" before each one is listed.
You can also link to other issues if necessary, e.g. "See also #1234".
https://help.github.com/articles/closing-issues-using-keywords
-->

- Closes #

<!--
Please give a brief overview of what has changed or been added in the PR.
This can include anything specific the maintainers should be looking for when they review the PR.
-->

Changes proposed in this pull request:

-
-

<!-- To be checked off by reviewers -->

## Checklist

_This section is for the PR reviewer_

- [ ] PR has an interpretable title with a prefix (`[ENH]`, `[FIX]`, `[REF]`, `[TST]`, `[CI]`, `[MNT]`, `[INF]`, `[MODEL]`, `[DOC]`) _(see our [Contributing Guidelines](https://neurobagel.org/contributing/CONTRIBUTING#pull-request-guidelines) for more info)_
- [ ] PR has a label for the release changelog or `skip-release` (to be applied by maintainers only)
- [ ] PR links to GitHub issue with mention `Closes #XXXX`
- [ ] Tests pass
- [ ] Checks pass

For new features:

- [ ] Tests have been added

For bug fixes:

- [ ] There is at least one test that would fail under the original bug conditions.
16 changes: 16 additions & 0 deletions .github/workflows/add_iss2project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Add new issues to project

on:
issues:
types:
- opened

jobs:
add-to-project:
name: Add issue to project
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/neurobagel/projects/1
github-token: ${{ secrets.NB_PROJECT_PAT }}
26 changes: 26 additions & 0 deletions .github/workflows/build_docker_on_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: build Docker image on release

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/query_tool:latest, ${{ secrets.DOCKERHUB_USERNAME }}/query_tool:${{ github.event.release.tag_name }}
28 changes: 28 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: auto release

on:
push:
branches:
- main

jobs:
auto-release:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Download latest auto
run: |
auto_download_url="$(curl -fsSL https://api.github.com/repos/intuit/auto/releases/latest | jq -r '.assets[] | select(.name == "auto-linux.gz") | .browser_download_url')"
wget -O- "$auto_download_url" | gunzip > ~/auto
chmod a+x ~/auto
- name: Release
run: ~/auto shipit -vv
env:
GH_TOKEN: ${{ secrets.NB_PAT_RELEASE }}
PROTECTED_BRANCH_REVIEWER_TOKEN: ${{ secrets.NB_PAT_RELEASE_PROTECTED }}
24 changes: 24 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: 'Close stale issues and PRs'
on:
schedule:
- cron: '30 1 * * *'

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v8
with:
stale-issue-message: |
We want to keep our issues up to date and active. This issue hasn't seen any activity in the last 75 days.
We have applied the `_flag:stale` label to indicate that this issue should be reviewed again.
When you review, please reread the spec and then apply one of these three options:
- prioritize: apply the `flag:schedule` label to suggest moving this issue into the backlog now
- close: if the issue is no longer relevant, explain why (give others a chance to reply) and then close.
- archive: sometimes an issue has important information or ideas but we won't work on it soon. In this case
apply the `someday` label to show that this won't be prioritized. The stalebot will ignore issues with this
label in the future. Use sparingly!
days-before-stale: 75
days-before-close: -1
stale-issue-label: '_flag:stale'
exempt-issue-labels: 'Roadmap,Milestone,Epic,someday'

0 comments on commit cac110a

Please sign in to comment.