Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
george-lim committed Jan 16, 2021
0 parents commit 6b022c4
Show file tree
Hide file tree
Showing 4 changed files with 110 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CD

on:
push:
tags: v[0-9]+.[0-9]+.[0-9]+
workflow_dispatch:
inputs:
version:
description: Version to deploy
default: 1.0.0

env:
TARGET_VERSION: ${{ github.event.inputs.version || github.ref }}

jobs:
release:
name: Create release
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Strip target version prefix
run: echo TARGET_VERSION=${TARGET_VERSION#refs/*/v} >> $GITHUB_ENV
- name: Create release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ env.TARGET_VERSION }}
release_name: Release v${{ env.TARGET_VERSION }}
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: CI

on:
push:
branches: main
pull_request:
branches: main
workflow_dispatch:

jobs:
lint:
name: Run linter
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Run linter
uses: github/super-linter@v3
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 George Lim

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Basic Template

[![releases](https://img.shields.io/github/v/release/george-lim/basic-template)](https://github.com/george-lim/basic-template/releases)
[![ci](https://github.com/george-lim/basic-template/workflows/CI/badge.svg)](https://github.com/george-lim/basic-template/actions)
[![license](https://img.shields.io/github/license/george-lim/basic-template)](https://github.com/george-lim/basic-template/blob/main/LICENSE)

## [Usage](#usage) | [Features](#features) | [Examples](#examples) | [CI/CD](#cicd)

Basic Template is a template repository that provides basic CI/CD workflows.

## Usage

Choose `george-lim/basic-template` as the template when creating a new repository.

## Features

Basic Template provides a `README.md`, `LICENSE` and two workflows for GitHub Actions.

## Examples

There are no examples to provide for Basic Template.

## CI/CD

### Pipeline

There are two workflows in this repository. Each workflow supports manual triggering.

The `CI` workflow is automatically triggered whenever there is push activity in `main` or pull request activity towards `main`. It has one job:

1. Lint the codebase with GitHub's [Super-Linter](https://github.com/github/super-linter).

The `CD` workflow is automatically triggered whenever there is a tag pushed to the repository. It has one job:

1. Create a GitHub release with the tag.

0 comments on commit 6b022c4

Please sign in to comment.