Skip to content

Commit dd1387e

Browse files
Merge pull request #3 from nimblehq/release/0.1.0
Release - 0.1.0
2 parents bb74c01 + 8f1b8bc commit dd1387e

File tree

3 files changed

+114
-14
lines changed

3 files changed

+114
-14
lines changed
Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
1-
Link to the milestone on Github e.g. https://github.com/nimblehq/git-templates/milestone/41?closed=1
2-
or
3-
Link to the project management tool for the release
1+
https://github.com/nimblehq/github-actions-workflows/milestone/
42

53
## Features
64

7-
Provide the ID and title of the issue in the section for each type (feature, chore and bug). The link is optional.
5+
Provide the Pull Request IDs in the section for each type (feature, chore, and bug), e.g.
86

9-
- [ch1234] As a user, I can log in
10-
or
11-
- [[ch1234](https://github.com/nimblehq/git-templates/issues/1234)] As a user, I can log in
7+
- #1234
128

139
## Chores
14-
- Same structure as in ## Feature
10+
- Same structure as in ## Feature
1511

1612
## Bugs
17-
- Same structure as in ## Feature
13+
- Same structure as in ## Feature

.github/workflows/publish_wiki.yml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# This workflow will publish all of the documents stored under ./github/wiki directory
2+
# to Github Wiki of the given repository.
3+
#
4+
# To use this workflow, please follow these steps
5+
# - Setup the Github Wiki by following this official guide
6+
# https://docs.github.com/en/communities/documenting-your-project-with-wikis/adding-or-editing-wiki-pages#adding-wiki-pages
7+
# - Create Personal Access Token with `repo` scope enabled - a bot account is recommended to generate that token
8+
# https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
9+
# - Create a Repository Secret for the above token, e.g. name it as GH_ACTION_TOKEN
10+
# - Define your own workflow and provide the required inputs & secret, here is an example workflow:
11+
#
12+
# name: Publish Wiki
13+
#
14+
# on:
15+
# push:
16+
# branches:
17+
# - develop
18+
# paths:
19+
# - .github/wiki/**
20+
#
21+
# jobs:
22+
# publish:
23+
# name: Publish Wiki
24+
# uses: nimblehq/github-actions-workflows/.github/workflows/[email protected]
25+
# with:
26+
# USER_NAME: github-wiki-action
27+
# USER_EMAIL: [email protected]
28+
# secrets:
29+
# USER_TOKEN: ${{ secrets.GH_ACTION_TOKEN }}
30+
31+
name: Publish Wiki
32+
33+
on:
34+
workflow_call:
35+
inputs:
36+
# The username of a Github (bot) account
37+
USER_NAME:
38+
required: true
39+
type: string
40+
# The e-mail of a Github (bot) account
41+
USER_EMAIL:
42+
required: true
43+
type: string
44+
secrets:
45+
# The Personal Access Token of a Github (bot) account
46+
USER_TOKEN:
47+
required: true
48+
49+
env:
50+
USER_NAME: ${{ inputs.USER_NAME }}
51+
USER_EMAIL: ${{ inputs.USER_EMAIL }}
52+
USER_TOKEN: ${{ secrets.USER_TOKEN }}
53+
REPOSITORY: ${{ github.repository }}
54+
WIKI_FOLDER: .github/wiki
55+
TEMP_CLONE_WIKI_FOLDER: tmp_wiki
56+
57+
jobs:
58+
publish:
59+
name: Publish Github Wiki
60+
runs-on: ubuntu-latest
61+
timeout-minutes: 1
62+
63+
steps:
64+
- name: Cancel previous runs
65+
uses: styfle/[email protected]
66+
with:
67+
access_token: ${{ github.token }}
68+
69+
- name: Checkout the repository
70+
uses: actions/checkout@v2
71+
with:
72+
ref: ${{ github.head_ref }}
73+
74+
# This step will
75+
# - Create folder named `tmp_wiki`
76+
# - Initialize Git
77+
# - Pull old Wiki content
78+
- name: Pull current wiki content
79+
run: |
80+
mkdir $TEMP_CLONE_WIKI_FOLDER
81+
cd $TEMP_CLONE_WIKI_FOLDER
82+
git init
83+
git config user.name $USER_NAME
84+
git config user.email $USER_EMAIL
85+
git pull https://[email protected]/$REPOSITORY.wiki.git
86+
87+
# This step will
88+
# - Synchronize differences between `.github/wiki/` & `tmp_wiki`
89+
# - Push new Wiki content
90+
- name: Push new wiki content
91+
run: |
92+
rsync -av --delete $WIKI_FOLDER/ $TEMP_CLONE_WIKI_FOLDER/ --exclude .git
93+
cd $TEMP_CLONE_WIKI_FOLDER
94+
git add .
95+
git commit -m "Update Wiki content"
96+
git push -f --set-upstream https://[email protected]/$REPOSITORY.wiki.git master

README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
1-
# Git Repository Template
1+
<p align="center">
2+
<img alt="Nimble logo" src="https://assets.nimblehq.co/logo/light/logo-light-text-320.png" />
3+
</p>
24

3-
Project repository template to set up all public projects at [Nimble](https://nimblehq.co/)
5+
<p align="center">
6+
<strong>A collection of reusable Github Actions Workflows at Nimble</strong>
7+
</p>
48

9+
---
510
## Usage
11+
Follow the [instruction](https://docs.github.com/en/actions/learn-github-actions/reusing-workflows#calling-a-reusable-workflow) from Github to use any workflows in this repository.
612

7-
Clone the repository
8-
9-
`git clone [email protected]:nimblehq/git-template.git`
13+
## How to contribute
14+
- Refer to the [official guide](https://docs.github.com/en/actions/learn-github-actions/reusing-workflows#creating-a-reusable-workflow) to learn how to define a resuable workflow
15+
- Put the new workflow under `./github/workflows` directory
16+
- Follow our [convention](https://nimblehq.co/compass/development/code-conventions/github-actions/) when defining the workflow
17+
- Submit a [Pull rquest](https://github.com/nimblehq/github-actions-workflows/compare) to this repository
1018

1119
## License
1220

0 commit comments

Comments
 (0)