Skip to content

Commit

Permalink
Add check workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
fioncat committed Jan 24, 2024
1 parent 0d8dfe9 commit 214aabf
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: check

on:
push:
branches:
- "main"
- "build-ci"
pull_request:
branches:
- "main"

jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable

- name: Cargo test
run: cargo check
10 changes: 8 additions & 2 deletions .github/workflows/csyncd-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@ jobs:
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3 | sed -e "s/^v//")

- name: Build the image
run: docker build -f csyncd/Dockerfile -t fioncat/csync:${{ steps.get_version.outputs.VERSION }} .
run: docker build -f csyncd/Dockerfile -t fioncat/csyncd:${{ steps.get_version.outputs.VERSION }} .

- name: Push the image
run: docker push fioncat/csync:${{ steps.get_version.outputs.VERSION }}
run: docker push fioncat/csyncd:${{ steps.get_version.outputs.VERSION }}

- name: Tag latest image
run: docker tag fioncat/csyncd:${{ steps.get_version.outputs.VERSION }} fioncat/csyncd:latest

- name: Push latest image
run: docker push fioncat/csyncd:latest

0 comments on commit 214aabf

Please sign in to comment.