Repository navigation
59 lines (50 loc) · 2.07 KB
/
Copy pathpre-commit-auth.yaml
File metadata and controls
59 lines (50 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
on:
workflow_call:
inputs:
jfrog_url:
description: "URL of Artifactory server"
type: string
default: "https://nethermind.jfrog.io"
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Configure JFrog CLI
id: jfrog
uses: jfrog/setup-jfrog-cli@1a84ddcff2d475751d8392ef6d7ecb478a7cfe53 # v5.3.1
env:
JFROG_URL: ${{ inputs.jfrog_url }}
with:
oidc-provider-name: github-nethermindeth
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install Terraform
uses: hashicorp/setup-terraform@dfe3c3f87815947d99a8997f908cb6525fc44e9e # v4
- name: Install Python
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
- name: Install terraform-docs
uses: jaxxstorm/action-install-gh-release@25e24d2d23ae098373794ef1d6faecb48ee52da8 # v3.0.0
with:
repo: terraform-docs/terraform-docs
tag: v0.17.0
- name: Install tflint
uses: jaxxstorm/action-install-gh-release@25e24d2d23ae098373794ef1d6faecb48ee52da8 # v3.0.0
with:
repo: terraform-linters/tflint
tag: v0.55.1
- name: Install pre-commit
env:
WORKFLOW_REPOSITORY: ${{ job.workflow_repository }}
WORKFLOW_SHA: ${{ job.workflow_sha }}
run: |
curl -fsSL --retry 3 -o "$RUNNER_TEMP/pre-commit.txt" \
"https://raw.githubusercontent.com/$WORKFLOW_REPOSITORY/$WORKFLOW_SHA/.github/requirements/pre-commit.txt"
python -m pip install --require-hashes -r "$RUNNER_TEMP/pre-commit.txt"
python -m pip freeze --local
- name: Cache pre-commit environments
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.cache/pre-commit
key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: Run pre-commit hooks
run: pre-commit run --show-diff-on-failure --color=always --all-files