forked from codefresh-io/terraform-provider-codefresh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
codefresh.yml
61 lines (58 loc) · 1.46 KB
/
codefresh.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
version: '1.0'
stages:
- clone
- test
- pakcages
- release
steps:
main_clone:
title: 'Cloning main repository...'
stage: clone
type: git-clone
repo: "${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}"
revision: "${{CF_REVISION}}"
git: cf_github
go_fmt:
title: 'Formatting'
stage: test
image: goreleaser/goreleaser:v0.133
commands:
- go fmt
prepare_env_vars:
title: 'Preparing environment variables...'
stage: release
image: codefreshio/ci-helpers
environment:
- GPG_FINGERPRINT=${{GPG_FINGERPRINT}}
- SIGNINGKEY=${{SIGNINGKEY}}
commands:
- source /get-token/get-gh-token.sh
- cf_export GITHUB_TOKEN
- cf_export GPG_FINGERPRINT
- cf_export SIGNINGKEY
- cf_export GPG_PRIVATE
when:
condition:
all:
release: "'${{RELEASE}}' == 'true'"
release_binaries:
title: Create release in Github
image: goreleaser/goreleaser:v0.133
stage: release
environment:
- GPG_FINGERPRINT=${{GPG_FINGERPRINT}}
- SIGNINGKEY=${{SIGNINGKEY}}
- GPG_PRIVATE=${{GPG_PRIVATE}}
commands:
- apk update
- apk fetch gnupg
- apk add gnupg
- echo ${GPG_PRIVATE} | base64 -d > /tmp/private.key
- gpg --import /tmp/private.key
- git config user.signingkey ${GPG_FINGERPRINT}
- git clean -fdx
- goreleaser release --rm-dist
when:
condition:
all:
release: "'${{RELEASE}}' == 'true'"