Merge branch 'fevral13:master' into master #50
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.76 && rustup default 1.76 | |
- 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}} |