forked from fevral13/evalrs
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (33 loc) · 1.04 KB
/
ci.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
name: CI
on:
push:
branches:
- master
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: install exact rust compiler
run: rustup toolchain install 1.71 && rustup default 1.71
- name: Run tests
run: cargo test --verbose
build_and_deploy:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v3
- uses: SebRollen/toml-action@v1.0.2
id: evalrs_version
with:
file: 'Cargo.toml'
field: 'package.version'
- name: Build evalrs image
run: docker build -t ${{secrets.DOCKERHUB_USERNAME}}/evalrs:${{steps.evalrs_version.outputs.value}} -f Dockerfile-ci .
- name: login to dockerhub repo
run: echo ${{secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{secrets.DOCKERHUB_USERNAME}} --password-stdin
- name: Push evalrs image
run: docker push ${{secrets.DOCKERHUB_USERNAME}}/evalrs:${{steps.evalrs_version.outputs.value}}