Skip to content

Commit 6b68641

Browse files
committed
Set up pre-commit
1 parent 325fe76 commit 6b68641

File tree

7 files changed

+18
-12
lines changed

7 files changed

+18
-12
lines changed

.github/workflows/base.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
platforms: linux/amd64,linux/arm64
3939
cache-from: type=gha
4040
cache-to: type=gha,mode=max
41-
41+
4242
ubuntu_base_deploy:
4343
runs-on: ubuntu-latest
4444
strategy:
@@ -72,7 +72,7 @@ jobs:
7272
platforms: linux/amd64,linux/arm64
7373
cache-from: type=gha
7474
cache-to: type=gha,mode=max
75-
75+
7676
debian_base_deploy:
7777
runs-on: ubuntu-latest
7878
strategy:

.github/workflows/deploy.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Set up Docker Buildx
2424
uses: docker/setup-buildx-action@v1
2525
- name: Update Dockerfile FROM org
26-
run: sed -i.bak "s/FROM.*/FROM ${ORG}\/github-runner-base:latest/" Dockerfile
26+
run: sed -i.bak "s/FROM.*/FROM ${ORG}\/github-runner-base:latest/" Dockerfile
2727
- name: Login to DockerHub
2828
uses: docker/login-action@v1
2929
with:

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: Set up Docker Buildx
3838
uses: docker/setup-buildx-action@v1
3939
- name: Update Dockerfile FROM org
40-
run: sed -i.bak "s/FROM.*/FROM ${ORG}\/github-runner-base:latest/" Dockerfile
40+
run: sed -i.bak "s/FROM.*/FROM ${ORG}\/github-runner-base:latest/" Dockerfile
4141
- name: Login to DockerHub
4242
uses: docker/login-action@v1
4343
with:

.github/workflows/test.yml

+2
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v2
12+
- uses: actions/setup-python@v3
13+
- uses: pre-commit/[email protected]
1214
- name: Run ShellCheck
1315
uses: ludeeus/action-shellcheck@master

.pre-commit-config.yaml

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
repos:
2-
- repo: git://github.com/detailyang/pre-commit-shell
3-
rev: 1.0.2
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.3.0
44
hooks:
5-
- id: shell-lint
6-
args: [-e, SC1008]
5+
- id: check-yaml
6+
- id: end-of-file-fixer
7+
- id: trailing-whitespace
8+
- id: check-case-conflict
9+
- id: check-merge-conflict
10+
- id: detect-private-key
711
- repo: https://github.com/stratasan/hadolint-pre-commit
812
rev: cdefcb096e520a6daa9552b1d4636f5f1e1729cd
913
hooks:

Dockerfile.base

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ENV LANGUAGE=en_US.UTF-8
1111
ENV LC_ALL=en_US.UTF-8
1212
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
1313
ENV DEBIAN_FRONTEND=noninteractive
14-
# hadolint ignore=DL3003,DL4001,SC2086
14+
# hadolint ignore=SC2086,DL3015
1515
RUN echo en_US.UTF-8 UTF-8 >> /etc/locale.gen \
1616
&& apt-get update \
1717
&& apt-get install -y --no-install-recommends gnupg \
@@ -54,7 +54,7 @@ RUN echo en_US.UTF-8 UTF-8 >> /etc/locale.gen \
5454
&& ( apt-get install -y --no-install-recommends git || apt-get install -t stable -y --no-install-recommends git || apt-get install -y --no-install-recommends git=1:2.33.1-0ppa1~ubuntu18.04.1 git-man=1:2.33.1-0ppa1~ubuntu18.04.1 ) \
5555
&& ( [[ $(apt-cache search -n liblttng-ust0 | awk '{print $1}') == "liblttng-ust0" ]] && apt-get install -y --no-install-recommends liblttng-ust0 || : ) \
5656
&& ( [[ $(apt-cache search -n liblttng-ust1 | awk '{print $1}') == "liblttng-ust1" ]] && apt-get install -y --no-install-recommends liblttng-ust1 || : ) \
57-
&& ( ( curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m).zip" -o "awscliv2.zip" && unzip awscliv2.zip -d /tmp/ && /tmp/aws/install && rm awscliv2.zip) || pip3 install awscli ) \
57+
&& ( ( curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m).zip" -o "awscliv2.zip" && unzip awscliv2.zip -d /tmp/ && /tmp/aws/install && rm awscliv2.zip) || pip3 install --no-cache-dir awscli ) \
5858
&& ( curl -s "https://github.com/git-lfs/git-lfs/releases/download/v${GIT_LFS_VERSION}/git-lfs-linux-${DPKG_ARCH}-v${GIT_LFS_VERSION}.tar.gz" -L -o /tmp/lfs.tar.gz && tar -xzf /tmp/lfs.tar.gz -C /tmp && /tmp/git-lfs-${GIT_LFS_VERSION}/install.sh && rm -rf /tmp/lfs.tar.gz /tmp/git-lfs-${GIT_LFS_VERSION}) \
5959
# Determine the Distro name (Debian, Ubuntu, etc)
6060
&& distro=$(lsb_release -is | awk '{print tolower($0)}') \
@@ -70,7 +70,7 @@ RUN echo en_US.UTF-8 UTF-8 >> /etc/locale.gen \
7070
&& ( [[ "${LSB_RELEASE_CODENAME}" == "focal" ]] && ( echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04/ /" | tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list && curl -L "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04/Release.key" | apt-key add - && apt-get update) || : ) \
7171
&& ( [[ "${LSB_RELEASE_CODENAME}" == "focal" || "${LSB_RELEASE_CODENAME}" == "jammy" || "${LSB_RELEASE_CODENAME}" == "sid" || "${LSB_RELEASE_CODENAME}" == "bullseye" ]] && apt-get install -y --no-install-recommends podman buildah skopeo || : ) \
7272
&& ( [[ "${LSB_RELEASE_CODENAME}" == "jammy" ]] && echo "Ubuntu Jammy is marked as beta. Please see https://github.com/actions/virtual-environments/issues/5490" || : ) \
73-
&& GH_CLI_INSTALL_FILE="/tmp/gh-$$.deb" && curl -sSLo "${GH_CLI_INSTALL_FILE}" "https://github.com$(curl -sSL "https://github.com/cli/cli/releases/latest" | grep -Po "(?<=href=\")/cli/cli/releases/download/[^\"]*${DPKG_ARCH}[.]deb(?=\")")" && apt -y install "${GH_CLI_INSTALL_FILE}" \
73+
&& GH_CLI_INSTALL_FILE="/tmp/gh-$$.deb" && curl -sSLo "${GH_CLI_INSTALL_FILE}" "https://github.com$(curl -sSL "https://github.com/cli/cli/releases/latest" | grep -Po "(?<=href=\")/cli/cli/releases/download/[^\"]*${DPKG_ARCH}[.]deb(?=\")")" && apt-get -y install "${GH_CLI_INSTALL_FILE}" \
7474
&& rm -rf /var/lib/apt/lists/* \
7575
&& rm -rf /tmp/* \
7676
&& groupadd -g 121 runner \

SECURITY.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ If you believe you have found a security vulnerability, please report it to me a
44

55
## Reporting Security Issues
66

7-
**Please do not report security vulnerabilities through public GitHub issues.** Instead, please report them to me directly at [[email protected]](mailto:[email protected]).
7+
**Please do not report security vulnerabilities through public GitHub issues.** Instead, please report them to me directly at [[email protected]](mailto:[email protected]).
88

99
If you'd like to communicate securely, my keybase is [here](https://keybase.io/3vilpenguin)
1010

0 commit comments

Comments
 (0)