Skip to content

Commit

Permalink
feat: Pre commit update (#12)
Browse files Browse the repository at this point in the history
* pre-commit-config
* gh action on pre-commit
  • Loading branch information
mabunixda authored Sep 28, 2022
1 parent dc22ff5 commit a040786
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 2 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ jobs:
outputs:
version: ${{ steps.semrel.outputs.version }}
steps:
- uses: actions/checkout@v3
- name: Check pre-commit presence
id: precommit_exists
uses: andstor/file-existence-action@v1
with:
files: ".pre-commit-config.yaml"
- uses: actions/setup-python@v3
if: steps.precommit_exists.outputs.files_exists == 'true'
- uses: pre-commit/[email protected]
if: steps.precommit_exists.outputs.files_exists == 'true'

- uses: go-semantic-release/action@v1
if: github.event_name != 'pull_request'
id: semrel
Expand Down
15 changes: 15 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/hadolint/hadolint
rev: master
hooks:
- id: hadolint-docker
stages: [commit]
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@
#### Chores

* **ci:** commit changes from go-semantic-release (4385c5fa)

4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ FROM docker.io/mikefarah/yq:$YQ_VERSION as yq

FROM docker.io/hashicorp/packer:$PACKER_VERSION

# hadolint ignore=DL3018
RUN apk add --no-cache aws-cli bash jq curl gettext ruby-dev ruby-bundler make gcc g++ libc-dev ansible musl-dev python3-dev py3-pip libffi-dev openssl-dev cargo

COPY --from=yq /usr/bin/yq /usr/local/bin/yq
COPY --from=mondoo /usr/local/bin/mondoo /usr/local/bin/mondoo
COPY --from=tf /bin/terraform /usr/local/bin/terraform

RUN pip3 install azure-cli
# hadolint ignore=DL3013
RUN pip3 install --no-cache-dir azure-cli

ENTRYPOINT ["/bin/bash"]

0 comments on commit a040786

Please sign in to comment.