Skip to content

Commit

Permalink
Merge pull request #147 from rosineygp/feat/auto-release
Browse files Browse the repository at this point in the history
Feat/auto release
  • Loading branch information
rosineygp authored Apr 17, 2021
2 parents 4c8b18a + 2c2e9e8 commit 52991f2
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 38 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
on:
push:
tags:
- 'v*'

name: Upload Release Asset

jobs:
build:
name: Upload Release Asset
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: .mkdkr
asset_name: mkdkr
asset_content_type: application/x-sh
86 changes: 48 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
[![kcov](https://img.shields.io/endpoint?url=https%3A%2F%2Fmkdkr.surge.sh%2Fcoverage.json)](https://mkdkr.surge.sh/)
[![CodeFactor](https://www.codefactor.io/repository/github/rosineygp/mkdkr/badge)](https://www.codefactor.io/repository/github/rosineygp/mkdkr)
![Docker Pulls](https://img.shields.io/docker/pulls/rosiney/mkdkr)
![GitHub all releases](https://img.shields.io/github/downloads/rosineygp/mkdkr/total)

> mkdkr = Makefile + Docker
Expand All @@ -38,50 +39,52 @@ Super small and powerful framework for build CI pipeline, scripted with Makefile
Table of contents
-----------------

* [Usage](#usage)
* [Installation](#installation)
* [Create Makefile](#create-makefile)
* [Execute](#execute)
* [Result](#result)
* [Export](#export)
* [Reason](#reason)
* [Functions](#functions)
* [@$(dkr)](#dkr)
* [instance:](#instance)
* [service:](#service)
* [dind:](#dind)
* [run:](#run)
* [var-run:](#var-run)
* [login:](#login)
* [retry:](#retry)
* [log:](#log)
* [push:](#push)
* [pull:](#pull)
* [cd:](#cd)
* [Includes](#includes)
* [Explicit](#explicit)
* [Implicit](#implicit)
* [mkdkr.csv](#mkdkr.csv)
* [Collection](#collection)
* [Helpers](#helpers)
* [Examples](#examples)
* [Simple](#simple)
* [Service](#service)
* [DIND](#dind)
* [Escapes](#escapes)
* [Shell](#shell)
* [Stdout](#stdout)
* [Pipelines](#pipelines)
* [Environment Variables](#environment-variables)
* [Migration](#migration)
- [mkdkr](#mkdkr)
- [Table of contents](#table-of-contents)
- [Usage](#usage)
- [Installation](#installation)
- [Makefile](#makefile)
- [Execute](#execute)
- [Result](#result)
- [Export](#export)
- [Reason](#reason)
- [Functions](#functions)
- [@$(dkr)](#dkr)
- [instance:](#instance)
- [service:](#service)
- [dind:](#dind)
- [run:](#run)
- [var-run:](#var-run)
- [login:](#login)
- [retry:](#retry)
- [log:](#log)
- [push:](#push)
- [pull:](#pull)
- [cd:](#cd)
- [Includes](#includes)
- [Explicit](#explicit)
- [Implicit](#implicit)
- [mkdkr.csv](#mkdkrcsv)
- [Collection](#collection)
- [Helpers](#helpers)
- [Examples](#examples)
- [Simple](#simple)
- [Service](#service-1)
- [DIND](#dind-1)
- [Escapes](#escapes)
- [Shell](#shell)
- [Stdout](#stdout)
- [Pipelines](#pipelines)
- [Environment Variables](#environment-variables)
- [Migration](#migration)

# Usage

## Installation

```bash
# Download .mkdkr
curl https://raw.githubusercontent.com/rosineygp/mkdkr/master/.mkdkr > .mkdkr
curl -fsSL https://github.com/rosineygp/mkdkr/releases/latest/download/mkdkr > .mkdkr

# not required, but can be used as template
curl https://raw.githubusercontent.com/rosineygp/mkdkr/master/examples/simple.mk > Makefile
Expand All @@ -93,14 +96,21 @@ Create a file with name Makefile and paste the following content

```Makefile
# Required header
include $(shell bash .mkdkr init)
include $(shell if [ ! -f .mkdkr ]; then curl -fsSL https://github.com/rosineygp/mkdkr/releases/latest/download/mkdkr > .mkdkr; fi && bash .mkdkr init)

job: # job name
@$(dkr) # required: load mkdkr (docker layer)
instance: alpine # create a docker container using alpine image
run: echo "hello mkdkr!" # execute a command inside container
```

.gitignore (optional)

```.gitignore
.tmp
.mkdkr
```

## Execute

```bash
Expand Down

0 comments on commit 52991f2

Please sign in to comment.