-
Notifications
You must be signed in to change notification settings - Fork 2
/
.cirrus.yml
44 lines (41 loc) · 1.64 KB
/
.cirrus.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
container:
image: golang:latest
task:
name: Test
test_script:
- go test ./...
task:
name: JavaScript Protocol Buffers and gRPC code-generation
container:
image: node:latest
prepare_script:
- apt-get update && apt-get -y install protobuf-compiler
- npm install -g @bufbuild/buf ts-protoc-gen
# Work around https://github.com/protocolbuffers/protobuf-javascript/issues/127,
- npm install -g protoc-gen-js
# Work around https://github.com/protocolbuffers/protobuf-javascript/issues/127,
# once Protocol Buffers team manages to properly release protoc-gen-js on NPM,
# it would be as simple as "npm install -g protoc-gen-js"
# (currently it's a third-party package)
work_around_js_split_script:
- wget -O - https://github.com/protocolbuffers/protobuf-javascript/releases/download/v3.21.2/protobuf-javascript-3.21.2-linux-x86_64.tar.gz | tar xz bin/protoc-gen-js
- mv bin/protoc-gen-js /usr/local/bin/
code_generation_script: buf generate
buf_codegen_artifacts:
path: buf-codegen/*
docker_builder:
name: Release Docker Image
only_if: $CIRRUS_TAG != ''
env:
GITHUB_TOKEN: ENCRYPTED[!82ed873afdf627284305afef4958c85a8f73127b09978a9786ac521559630ea6c9a5ab6e7f8315abf9ead09b6eff6eae!]
login_script:
- echo $GITHUB_TOKEN | docker login ghcr.io -u fkorotkov --password-stdin
setup_script:
- docker buildx create --name multibuilder
- docker buildx use multibuilder
- docker buildx inspect --bootstrap
deploy_script: |
docker buildx build --push --platform linux/amd64,linux/arm64 \
--tag ghcr.io/cirruslabs/terminal:$CIRRUS_TAG \
--tag ghcr.io/cirruslabs/terminal:latest \
.