💥 load_all_speaker_phone
再実装
#365
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: server CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
paths: | |
- '.github/workflows/*' | |
- 'server/**' | |
- 'proto/**' | |
env: | |
PROTOC_VERSION: '29.3' | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
workspaces: 'server -> target' | |
save-if: ${{ github.ref == 'refs/heads/main' }} | |
- run: | | |
PROTOC_ZIP="protoc-$PROTOC_VERSION-linux-x86_64.zip" | |
curl -fvLO \ | |
"https://github.com/protocolbuffers/protobuf/releases/download/v$PROTOC_VERSION/$PROTOC_ZIP" | |
sudo unzip -o "$PROTOC_ZIP" -d /usr/local bin/protoc | |
sudo unzip -o "$PROTOC_ZIP" -d /usr/local 'include/*' | |
rm "$PROTOC_ZIP" | |
- run: | | |
cd server | |
cargo build | |
cargo fmt --all -- --check | |
cargo clippy -- -D warnings | |
docker: | |
runs-on: ubuntu-latest | |
needs: check | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
permissions: | |
contents: write | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/setup-buildx-action@v3 | |
- uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: h1rono | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: ghcr.io/trap-jp/h24w_14 | |
tags: | | |
type=raw,value=server-latest | |
type=raw,value=latest | |
type=ref,event=branch,prefix=server-,suffix= | |
type=sha,prefix=server-,suffix= | |
- uses: docker/build-push-action@v6 | |
with: | |
context: "." | |
file: ./Dockerfile | |
push: true | |
platforms: linux/amd64 | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
provenance: false |