Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions .github/workflows/release.yaml

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[actionlint] reported by reviewdog 🐶
the runner of "actions-rs/toolchain@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue [action]

- uses: actions-rs/toolchain@v1

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[actionlint] reported by reviewdog 🐶
the runner of "actions-rs/toolchain@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue [action]

- uses: actions-rs/toolchain@v1

Original file line number Diff line number Diff line change
Expand Up @@ -87,31 +87,34 @@ jobs:
docker:
runs-on: ubuntu-latest
environment: docker
needs:
- info
steps:
- uses: docker/setup-qemu-action@v3

- uses: docker/setup-buildx-action@v3

- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- uses: docker/metadata-action@v5
id: meta
with:
images: 1915keke/commitlint-rs
tags: |
type=raw,value=latest
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}

- uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
tags: 1915keke/commitlint-rs:${{ needs.info.outputs.tag }}
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max

info:
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.info.outputs.tag }}
steps:
- id: info
run: echo tag=$(echo $GITHUB_REF | cut -d / -f 3 | sed -e 's/v//') >> $GITHUB_OUTPUT

publish:
runs-on: ubuntu-latest
needs:
Expand Down
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
FROM rust:1.80-alpine as builder
WORKDIR /app

RUN apk update \
RUN --mount=type=cache,target=/var/cache/apk,sharing=locked \
apk update \
&& apk add --no-cache musl-dev

RUN --mount=type=bind,target=. cargo install --path .
COPY . .
RUN cargo install --path .

FROM alpine
LABEL maintainer="KeisukeYamashita <19yamashita15@gmail.com>"

RUN apk update \
RUN --mount=type=cache,target=/var/cache/apk,sharing=locked \
apk update \
&& apk add --no-cache musl-dev

COPY --from=builder /usr/local/cargo/bin/commitlint /usr/local/bin/commitlint
Expand Down