Skip to content

Commit

Permalink
Add Dockerfile, add ci
Browse files Browse the repository at this point in the history
  • Loading branch information
LucienShui committed Nov 26, 2019
1 parent 79e0760 commit 5e2f13e
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name-template: 'release-v$NEXT_PATCH_VERSION'
tag-template: 'release-v$NEXT_PATCH_VERSION'
categories:
- title: 'Features'
labels:
- 'feature'
- 'enhancement'
- title: 'Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: 'Maintenance'
labels:
- 'chore'
- 'documentation'
change-template: '- $TITLE (#$NUMBER) @$AUTHOR'
template: |
# Changes
$CHANGES
17 changes: 17 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Release Drafter

on:
push:
branches:
- master

jobs:
draft_release:
if: github.repository == 'PasteUs/golang-alpine'
name: Draft release
runs-on: ubuntu-latest
steps:
- uses: toolmantim/release-drafter@v5.2.0
name: Draft
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30 changes: 30 additions & 0 deletions .github/workflows/upload-to-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Docker Release

on:
release:
types: [published]

jobs:

release:
if: github.repository == 'PasteUs/golang-alpine'
name: Run on ${{ matrix.os }} and push
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]

steps:
- name: Check out code
uses: actions/checkout@v1

- name: Publish Docker
uses: LucienShui/Publish-Docker-Github-Action@2.7.1
with:
name: registry.cn-hangzhou.aliyuncs.com/pasteus/golang-alpine
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
registry: registry.cn-hangzhou.aliyuncs.com
dockerfile: Dockerfile
tag_names: true
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM golang:1.13-alpine
RUN apk --no-cache add build-base

0 comments on commit 5e2f13e

Please sign in to comment.