Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/technote-space/gh-actions-template
Template for GitHub Actions
https://github.com/technote-space/gh-actions-template
github-actions template
Last synced: 4 months ago
JSON representation
Template for GitHub Actions
- Host: GitHub
- URL: https://github.com/technote-space/gh-actions-template
- Owner: technote-space
- License: mit
- Created: 2019-08-29T13:35:38.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-01-09T05:52:00.000Z (about 2 years ago)
- Last Synced: 2024-10-13T13:05:47.710Z (4 months ago)
- Topics: github-actions, template
- Language: TypeScript
- Homepage:
- Size: 22 MB
- Stars: 31
- Watchers: 3
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# GitHub Actions Template
[](https://github.com/technote-space/gh-actions-template/actions)
[](https://codecov.io/gh/technote-space/gh-actions-template)
[](https://www.codefactor.io/repository/github/technote-space/gh-actions-template)
[](https://github.com/technote-space/gh-actions-template/blob/master/LICENSE)Template for GitHub actions.
## Table of Contents
Details
- [Setup](#setup)
- [yarn](#yarn)
- [npm](#npm)
- [Workflows](#workflows)
- [ci.yml](#ciyml)
- [add-version-tag.yml](#add-version-tagyml)
- [toc.yml](#tocyml)
- [issue-opened.yml](#issue-openedyml)
- [pr-opened.yml](#pr-openedyml)
- [pr-updated.yml](#pr-updatedyml)
- [project-card-moved.yml](#project-card-movedyml)
- [broken-link-check.yml](#broken-link-checkyml)
- [update-dependencies.yml](#update-dependenciesyml)
- [add-test-tag.yml](#add-test-tagyml)
- [Secrets](#secrets)
- [Test release](#test-release)
- [Helpers](#helpers)
- [Author](#author)## Setup
### yarn
- `yarn setup`
### npm
- `npm run setup`## Workflows
Some `workflows` are included by default.
### ci.yml
CI Workflow1. ESLint
1. Jest
- Send coverage report to codecov if `CODECOV_TOKEN` is set.
1. Release GitHub Actions
- if tag is added.
1. Publish package
- if tag is added and `NPM_AUTH_TOKEN` is set.
1. Publish release
- if 3 and 4 jobs are succeeded.
1. Notify by slack
- if workflow is failure[ACCESS_TOKEN](#access_token) is required.
[SLACK_WEBHOOK_URL](#slack_webhook_url) is required.### add-version-tag.yml
Add the release tag when pull request is merged.1. Get next version from commits histories.
see [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)
1. Add tag.
1. Create branch for next version.[ACCESS_TOKEN](#access_token) is required.
### toc.yml
Create TOC (Table of contents)[ACCESS_TOKEN](#access_token) is required.
### issue-opened.yml
- Assign the issue to project
default setting:
```
Project: Backlog
Column: To do
```
- Assign author to issue### pr-opened.yml
- Assign the PR to project
default setting:
```
Project: Backlog
Column: In progress
```
[ACCESS_TOKEN](#access_token) is required.
- Assign author to PR
- Add labels by branch
[setting](.github/pr-labeler.yml)### pr-updated.yml
- Add labels by changed files
[setting](.github/labeler.yml)
- Create PR histories
- Manage PR by release type
[ACCESS_TOKEN](#access_token) is required.
- Check version in package.json
[ACCESS_TOKEN](#access_token) is required.
- Check if it can be published to npm
if `NPM_AUTH_TOKEN` is set### project-card-moved.yml
Manage labels by moving project cards### broken-link-check.yml
Check broken link in README### update-dependencies.yml
Update package dependencies- schedule
- PR opened, closed
- repository dispatch### add-test-tag.yml
Add tag for test release### Secrets
#### ACCESS_TOKEN
[Personal access token](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line) with the public_repo or repo scope
(repo is required for private repositories)#### SLACK_WEBHOOK_URL
https://api.slack.com/messaging/webhooks## Test release
[](https://github.com/technote-space/release-github-actions-cli)1. Create `.env`
Set [Personal access token](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line)
```dotenv
token=1234567890abcdef1234567890abcdef12345678
```
1. Run `yarn release`
- Dry run: `yarn release -n`
- Help: `yarn release -h`
Then, you can use your `GitHub Actions` like follows:
```yaml
on: push
name: Test
jobs:
toc:
name: Test
runs-on: ubuntu-latest
steps:
- uses: owner/repo@gh-actions
```## Helpers
[](https://github.com/technote-space/github-action-helper)[](https://github.com/technote-space/github-action-test-helper)
[](https://github.com/technote-space/filter-github-action)
## Author
[GitHub (Technote)](https://github.com/technote-space)
[Blog](https://technote.space)