-
Notifications
You must be signed in to change notification settings - Fork 56
53 lines (42 loc) · 1.5 KB
/
derive-typescript.yaml
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
name: derive-typescript
on:
push:
branches: [master]
paths: [crates/derive-typescript/**]
pull_request:
branches: [master]
paths: [crates/derive-typescript/**]
jobs:
build-and-test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: false
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.72.0
default: true
target: x86_64-unknown-linux-musl
- run: sudo apt install -y musl-tools
- name: Login to GitHub container registry
# TODO(johnny): Uncomment once merged.
# if: ${{ github.ref == 'refs/heads/master' }}
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | \
docker login --username ${{ github.actor }} --password-stdin ghcr.io
- uses: Swatinem/rust-cache@v2
with:
workspaces: |
crates/derive-typescript
- name: build `derive-typescript`
run: cd crates/derive-typescript && cargo build --target x86_64-unknown-linux-musl --release
- name: test `derive-typescript`
run: cd crates/derive-typescript && cargo test --target x86_64-unknown-linux-musl --release
- name: package docker image
run: docker build -t ghcr.io/estuary/derive-typescript:dev crates/derive-typescript/
- name: push docker image
if: ${{ github.ref == 'refs/heads/master' }}
run: docker push ghcr.io/estuary/derive-typescript:dev