add Dockerfile

This commit is contained in:
mii
2022-08-11 14:06:19 +09:00
parent af902c3c97
commit e988afef0d
2 changed files with 40 additions and 7 deletions

View File

@ -1,12 +1,29 @@
on: [push]
on:
push:
branches-ignore:
- '**'
tags:
- 'v*'
jobs:
build_and_test:
name: Rust project
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: docker/metadata-action@v3
id: meta
with:
toolchain: stable
- run: cargo build --release --all-features
images: ghcr.io/morioka22/ncb-tts-r2
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: morioka22
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}