-
Notifications
You must be signed in to change notification settings - Fork 6
94 lines (85 loc) · 2.83 KB
/
ci_reuse_go_cas.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: CI - golang
on:
workflow_call:
inputs:
ignore_copyright:
required: false
type: string
test_folder:
required: false
type: string
short_test:
required: false
type: string
ignore_build:
required: false
type: string
go_race:
required: false
type: string
build_cmd:
required: false
type: string
secrets:
reporeading_token:
required: true
codecov_token:
required: false
chargebee_token:
required: true
chargebee_sitename:
required: true
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
cache: false
- name: Checkout
uses: actions/checkout@v4
# Install TinyGo
- name: Install TinyGo
run: |
wget https://github.com/tinygo-org/tinygo/releases/download/v0.34.0/tinygo_0.34.0_amd64.deb
sudo dpkg -i tinygo_0.34.0_amd64.deb
- name: Check pull request file size
if: github.event_name == 'pull_request'
run: curl -s https://raw.githubusercontent.com/untillpro/ci-action/master/scripts/checkPR.sh | bash
env:
token: ${{ secrets.reporeading_token }}
pr_number: ${{ github.event.number }}
- name: CI
uses: untillpro/ci-action@master
with:
ignore: ${{ inputs.ignore_copyright }}
codecov-go-race: ${{ inputs.go_race }}
organization: 'untillpro,heeus'
token: ${{ secrets.reporeading_token }}
codecov-token: ${{ secrets.codecov_token }}
short-test: ${{ inputs.short_test }}
ignore-build: ${{ inputs.ignore_build }}
run-mod-tidy: false
env:
CHARGEBEE_PUBLISHABLE_KEY: ${{ secrets.chargebee_token }}
CHARGEBEE_SITE_NAME: ${{ secrets.chargebee_sitename }}
- name: Check copyright
run: curl -s https://raw.githubusercontent.com/untillpro/ci-action/master/scripts/check_copyright.sh | bash -s "$(go env GOPATH)"
- name: Linters
run: curl -s https://raw.githubusercontent.com/untillpro/ci-action/master/scripts/gbash.sh | bash -s "$(go env GOPATH)"
- name: Build executable
if: inputs.build_cmd != ''
run: |
git config --global url."https://${{ secrets.REPOREADING_TOKEN }}:[email protected]/heeus".insteadOf "https://github.com/heeus"
git config --global url."https://${{ secrets.REPOREADING_TOKEN }}:[email protected]/untillpro".insteadOf "https://github.com/untillpro"
${{ inputs.build_cmd }}
env:
GOPRIVATE: "github.com/untillpro/*,github.com/heeus/*"
- name: Upload project
uses: actions/upload-artifact@v4
with:
name: project-files
path: .
retention-days: 1