Skip to content

Commit 821745a

Browse files
committed
ci: Starting migration to github action
1 parent 34b888d commit 821745a

File tree

3 files changed

+67
-42
lines changed

3 files changed

+67
-42
lines changed

.github/workflows/build.yml

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
name: Build
3+
4+
on:
5+
push:
6+
branches:
7+
- master
8+
pull_request:
9+
branches:
10+
- master
11+
12+
env:
13+
SCRIPTS_NO_INTERACTIVE: "true"
14+
15+
defaults:
16+
run:
17+
shell: bash
18+
19+
jobs:
20+
build:
21+
name: Golang
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v2
25+
- uses: actions/setup-go@v2
26+
with:
27+
go-version: "^1.15"
28+
- run: |
29+
make
30+
git --no-pager diff -- ':(exclude)go.sum' && git diff --quiet -- ':(exclude)go.sum'
31+
- uses: codecov/codecov-action@v1
32+
33+
package:
34+
name: Docker
35+
runs-on: ubuntu-latest
36+
steps:
37+
- name: Set up Docker Buildx
38+
uses: docker/setup-buildx-action@v1
39+
- name: Login to DockerHub
40+
uses: docker/login-action@v1
41+
with:
42+
username: ${{ secrets.DOCKER_USER }}
43+
password: ${{ secrets.DOCKER_PASS }}
44+
- uses: actions/checkout@v2
45+
- uses: actions/setup-go@v2
46+
with:
47+
go-version: "^1.15"
48+
- name: Build
49+
run: |
50+
curl -q -sSL --max-time 30 "https://raw.githubusercontent.com/ViBiOh/scripts/master/bootstrap" | bash -s "release"
51+
DOCKER_IMAGE="${{ secrets.DOCKER_USER }}/$(make name)" IMAGE_VERSION="$(make version)" ./scripts/release build docker
52+
53+
publish:
54+
name: Publish
55+
runs-on: ubuntu-latest
56+
needs: package
57+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
58+
steps:
59+
- uses: actions/checkout@v2
60+
- name: Publish
61+
run: |
62+
curl -q -sSL --max-time 30 "https://raw.githubusercontent.com/ViBiOh/scripts/master/bootstrap" | bash -s "docker_promote"
63+
scripts/docker_promote "${{ secrets.DOCKER_USER }}/$(make name)" "$(make version)"
64+
- name: GoReport
65+
run: |
66+
curl -q -sSL --max-time 30 -X POST https://goreportcard.com/checks?repo=github.com/${GITHUB_REPOSITORY}

.travis.yml

-41
This file was deleted.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# goweb
22

3-
[![Build Status](https://travis-ci.com/ViBiOh/goweb.svg?branch=master)](https://travis-ci.com/ViBiOh/goweb)
3+
[![Build](https://github.com/ViBiOh/goweb/workflows/Build/badge.svg)](https://github.com/ViBiOh/goweb/actions)
44
[![codecov](https://codecov.io/gh/ViBiOh/goweb/branch/master/graph/badge.svg)](https://codecov.io/gh/ViBiOh/goweb)
55
[![Go Report Card](https://goreportcard.com/badge/github.com/ViBiOh/goweb)](https://goreportcard.com/report/github.com/ViBiOh/goweb)
66
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=ViBiOh_goweb&metric=alert_status)](https://sonarcloud.io/dashboard?id=ViBiOh_goweb)

0 commit comments

Comments
 (0)