This repository has been archived by the owner on Aug 29, 2024. It is now read-only.
forked from conventional-changelog/commitlint
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(container): add initial container wrapper and build action
- Loading branch information
1 parent
8806efc
commit c538d3c
Showing
5 changed files
with
96 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: container build | ||
on: | ||
push: | ||
tags: | ||
- '**' | ||
branches: | ||
- '**' | ||
- '!master' | ||
schedule: | ||
- cron: '0 0 * * *' | ||
jobs: | ||
container-build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Log into registry | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: commitlint/commitlint | ||
tags: | | ||
type=semver,pattern={{version}} | ||
type=edge,branch=master | ||
type=ref,event=branch | ||
type=sha,prefix=,format=short | ||
- name: Build and push container image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: Dockerfile.ci | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
# disable arm build for now, because of https://github.com/nodejs/docker-node/issues/1335 | ||
platforms: linux/amd64 #,linux/arm64 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
FROM docker.io/library/node:18-buster AS builder | ||
WORKDIR /src | ||
COPY . ./ | ||
RUN yarn install && \ | ||
yarn run build && \ | ||
# Commit lint CLI packages | ||
npm pack @commitlint/cli && \ | ||
npm pack @commitlint/config-validator && \ | ||
npm pack @commitlint/ensure && \ | ||
npm pack @commitlint/execute-rule && \ | ||
npm pack @commitlint/format && \ | ||
npm pack @commitlint/is-ignored && \ | ||
npm pack @commitlint/lint && \ | ||
npm pack @commitlint/load && \ | ||
npm pack @commitlint/message && \ | ||
npm pack @commitlint/parse && \ | ||
npm pack @commitlint/read && \ | ||
npm pack @commitlint/resolve-extends && \ | ||
npm pack @commitlint/rules && \ | ||
npm pack @commitlint/to-lines && \ | ||
npm pack @commitlint/top-level && \ | ||
npm pack @commitlint/types && \ | ||
# Default commitlint config | ||
npm pack @commitlint/config-conventional | ||
|
||
FROM docker.io/library/node:18-buster | ||
COPY --from=builder /src/*.tgz ./ | ||
RUN npm install -g *.tgz && \ | ||
rm -rf *.tgz | ||
ENTRYPOINT ["commitlint"] |
File renamed without changes.
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
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