-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (35 loc) · 959 Bytes
/
rust.yml
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
name: pinyin_tone_marks CI/CD
on:
push:
branches:
- "master"
pull_request:
types: [closed]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
push_to_registry:
name: Push Docker image to GitHub Packages
needs: build
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Get the app version
run: echo "APP_VERSION=$(cat VERSION)" >> $GITHUB_ENV
- name: Push to GitHub Packages
uses: docker/build-push-action@v1
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
repository: atomicmeganerd/pinyin_tone_marks/pinyin_tone_marks
tags: ${{ env.APP_VERSION }},latest