Skip to content
This repository has been archived by the owner on Aug 5, 2024. It is now read-only.

Commit

Permalink
ci: add github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Dec 13, 2023
1 parent ba1b258 commit 55112f5
Show file tree
Hide file tree
Showing 10 changed files with 191 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: Bug report
about: Create a report to help us improve
title: ""
labels: ""
assignees: ""
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Feature request
about: Suggest an idea for this project
title: ""
labels: ""
assignees: ""
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
14 changes: 14 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"devops":
- ".github/**/*"
- "Dockerfile"
- "*entrypoint.sh"
- "Makefile"
"dependency":
- "pyproject.toml"
- "pdm.lock"
"documentation":
- "docs/**/*"
- "mkdocs.yml"
- "README.md"
"version":
- "tm_admin/__version__.py"
20 changes: 20 additions & 0 deletions .github/workflows/build-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: 🔧 Build CI Img

on:
# Push includes PR merge
push:
branches: [main]
paths:
# Workflow is triggered only if deps change
- "pyproject.toml"
- "Dockerfile"
# Allow manual trigger
workflow_dispatch:

jobs:
ci-build:
uses: hotosm/gh-workflows/.github/workflows/[email protected]
with:
build_target: ci
image_tags: |
"ghcr.io/${{ github.repository }}:ci"
14 changes: 14 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: 🔧 Build

on:
push:
tags: ["*"]
# Allow manual trigger
workflow_dispatch:

jobs:
ci-build:
uses: hotosm/gh-workflows/.github/workflows/[email protected]
with:
build_target: prod
image_name: "ghcr.io/${{ github.repository }}"
24 changes: 24 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: 📖 Publish Docs

on:
push:
paths:
- docs/**
- tm_admin/**
- mkdocs.yml
branches: [main]
# Allow manual trigger (workflow_dispatch)
workflow_dispatch:

jobs:
build_doxygen:
uses: hotosm/gh-workflows/.github/workflows/[email protected]
with:
output_path: docs/apidocs

publish_docs:
uses: hotosm/gh-workflows/.github/workflows/[email protected]
needs: [build_doxygen]
with:
image: ghcr.io/${{ github.repository }}:ci
doxygen: true
14 changes: 14 additions & 0 deletions .github/workflows/pr_label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: 🏷️ PR Label

on:
pull_request_target:

jobs:
pr-label:
runs-on: ubuntu-latest

steps:
- uses: actions/labeler@v4
# Uses .github/labeler.yml definitions
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
13 changes: 13 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: 🚩 Publish to PyPi.org

on:
release:
types: [published]
# Allow manual trigger (workflow_dispatch)
workflow_dispatch:

jobs:
publish_to_pypi:
uses: hotosm/gh-workflows/.github/workflows/[email protected]
secrets:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
18 changes: 18 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: 🧪 PyTest

on:
# Run tests on all pushed branches
push:
branches: [main]
# Run tests on PR, prior to merge to main & development
pull_request:
branches: [main]
# Allow manual trigger (workflow_dispatch)
workflow_dispatch:

jobs:
pytest:
uses: hotosm/gh-workflows/.github/workflows/[email protected]
with:
image_name: ghcr.io/${{ github.repository }}
tag_override: ${{ github.event_name == 'push' && 'ci' || '' }}
15 changes: 15 additions & 0 deletions .github/workflows/wiki.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: 📖 Publish Docs to Wiki

on:
push:
paths:
- docs/**
branches: [main]
# Allow manual trigger (workflow_dispatch)
workflow_dispatch:

jobs:
publish-docs-to-wiki:
uses: hotosm/gh-workflows/.github/workflows/[email protected]
with:
homepage_path: "wiki_redirect.md"

0 comments on commit 55112f5

Please sign in to comment.