-
Notifications
You must be signed in to change notification settings - Fork 7
58 lines (56 loc) · 2.01 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Bead Colors CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
submodules: 'recursive'
- name: Test
uses: docker://golang:latest
with:
entrypoint: /bin/sh
args: |
-c "\
cd generation/ && go test ./...
- name: Test Generation
uses: docker://golang:latest
with:
entrypoint: /bin/sh
args: |
-c "\
cd generation/ && go run ./... ../raw ../gen
- name: Generation
uses: docker://golang:latest
if: "contains(github.ref, 'master') && !contains(toJSON(github.event.commits.*.msg), '[skip-ci]')"
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
entrypoint: /bin/sh
args: |
-c "\
cd generation/ && \
go run ./... ../raw ../gen && \
cd .. && \
git config --global --add safe.directory /github/workspace
git config --global user.email 'action@github.com' && \
git config --global user.name 'GitHub Action' && \
git add gen/ && \
git commit --allow-empty -m 'chore(ci): update' -m '[skip-ci]' && \
git push origin master"
- name: Bump version and push tag
id: tagging
uses: anothrNick/github-tag-action@master
if: "contains(github.ref, 'master') && !contains(toJSON(github.event.commits.*.msg), '[skip-ci]')"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
- name: Publish to registry
if: "contains(github.ref, 'master') && !contains(toJSON(github.event.commits.*.msg), '[skip-ci]')"
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: maxcleme/beadcolors
dockerfile: Dockerfile.website
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
tags: ${{ steps.tagging.outputs.new_tag }},latest