Skip to content
This repository has been archived by the owner on Jul 22, 2023. It is now read-only.

fix(deps): update rust crate serde to 1.0.174 #492

fix(deps): update rust crate serde to 1.0.174

fix(deps): update rust crate serde to 1.0.174 #492

Workflow file for this run

name: CI
on:
push:
paths-ignore:
- '.github/**'
- 'docs/**'
- '**.md'
env:
IMAGE: ghcr.io/giganticminecraft/seichi-ranking-bff
jobs:
lint-and-test:
name: Lint and test application
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Setup Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
# GitHubのUIにエラー/警告を表示してくれるので actions-rs/cargo を利用している
- name: Cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
- name: Cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: --all-features
build-image:
name: Build docker image (and publish on master)
needs: [lint-and-test]
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.IMAGE }}
tags: |
type=sha,prefix=sha-,suffix=,format=short
type=schedule,pattern={{date 'YYYYMMDD'}}
- name: Build (and push if on master)
id: docker_build
uses: docker/build-push-action@v4
with:
context: ./
file: ./Dockerfile
builder: ${{ steps.buildx.outputs.name }}
push: ${{ github.ref == 'refs/heads/master' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
# すべてのビルドステージのすべてのレイヤーをキャッシュして欲しいのでmode=max
cache-to: type=gha,mode=max