Skip to content

Commit a38b9ae

Browse files
authored
Staging (#41)
Updated CI configuration to use GitHub actions and publish staging images for live testing.
1 parent 7f4da0c commit a38b9ae

File tree

6 files changed

+91
-40
lines changed

6 files changed

+91
-40
lines changed

.github/workflows/deploy.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
branches: [master]
6+
tags:
7+
- "*"
8+
9+
jobs:
10+
deploy:
11+
name: deploy
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/setup-go@v2-beta
15+
with:
16+
go-version: 1.14.1
17+
- uses: actions/checkout@v2
18+
- run: go get -v -t -d
19+
20+
- name: Test
21+
run: go test -v ./...
22+
23+
- name: GoReleaser
24+
uses: goreleaser/goreleaser-action@v1
25+
with:
26+
version: latest
27+
args: release --rm-dist
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/go.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

.github/workflows/stage.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Stage
2+
3+
on:
4+
push:
5+
branches: [staging]
6+
7+
jobs:
8+
stage:
9+
name: stage
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/setup-go@v2-beta
13+
with:
14+
go-version: 1.14.1
15+
- uses: actions/checkout@v2
16+
- run: go get -v -t -d
17+
18+
- name: Test
19+
run: go test -v ./...
20+
21+
- name: GoReleaser
22+
uses: goreleaser/goreleaser-action@v1
23+
with:
24+
version: latest
25+
args: release --rm-dist --snapshot
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
29+
- name: Build Staging
30+
run: go build
31+
32+
- name: Publish
33+
uses: docker/build-push-action@v1
34+
with:
35+
username: ${{ secrets.DOCKER_USERNAME }}
36+
password: ${{ secrets.DOCKER_PASSWORD }}
37+
repository: picostack/pico
38+
tags: staging
39+
tag_with_sha: true

.github/workflows/test.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
test:
11+
name: test
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/setup-go@v2-beta
15+
with:
16+
go-version: 1.14.1
17+
- uses: actions/checkout@v2
18+
- run: go get -v -t -d
19+
20+
- name: Test
21+
run: go test -v ./...

.goreleaser.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ builds:
1313
checksum:
1414
name_template: "checksums.txt"
1515
snapshot:
16-
name_template: "{{ .Tag }}-next"
16+
name_template: "SNAPSHOT-{{ .ShortCommit }}"
1717
changelog:
1818
sort: asc
1919
filters:
@@ -25,6 +25,7 @@ dockers:
2525
- picostack/pico:{{ .Tag }}
2626
- picostack/pico:v{{ .Major }}
2727
- picostack/pico:v{{ .Major }}.{{ .Minor }}
28+
- picostack/pico:{{ .ShortCommit }}
2829
- picostack/pico:latest
2930
nfpms:
3031
- vendor: Southclaws

.travis.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)