Skip to content

ci: actions

ci: actions #1

Workflow file for this run

on: [push]
name: Build and Test
jobs:
build_and_test:
name: beatforge_api
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: test
- uses: actions-rs/cargo@v1
with:
command: build --release
# publish to ghcr.io and publish artifact
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags: ghcr.io/beatforge/beatforge_api:latest
- uses: actions/upload-artifact@v2
with:
name: beatforge_api
path: target/release/