Skip to content

Commit

Permalink
style: fixes all lints and typos spotted by pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
noirbizarre committed Apr 26, 2024
1 parent 36c4fcb commit 9fbe426
Show file tree
Hide file tree
Showing 39 changed files with 107 additions and 139 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/vault_helm_lint_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
with:
kubernetes-version: ${{ matrix.k8s }}
charts-path: ${{ inputs.charts-path }}

publish-chartmuseum-dev:
name: publish-chartmuseum-dev
if: inputs.version != ''
Expand Down
8 changes: 4 additions & 4 deletions cascade-merge/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ runs:
exit 0
fi
# Fetch and Sort Release Versions, breakdown of below command:
# Fetch and Sort Release Versions, breakdown of below command:
# 1) git branch -r
# List all remote branches.
# 2) grep -oP "origin/${BACKPORT_TARGET_BRANCH_PATTERN}\\K.*"
Expand All @@ -221,7 +221,7 @@ runs:
RELEASE_VERSIONS=$(git branch -r | grep -oP "origin/${BACKPORT_TARGET_BRANCH_PATTERN}\\K.*" | sort -Vu)
echo "Fetched and sorted release versions: $RELEASE_VERSIONS"
# Calculate the index of the original version, breakdown of below command:
# 1) echo "$RELEASE_VERSIONS"
# Prints the space-separated list of versions.
Expand All @@ -231,10 +231,10 @@ runs:
# Finds the line number of the original version.
# 4) cut -d: -f1
# Extracts the line number from the grep output.
CURRENT_INDEX=$(echo "$RELEASE_VERSIONS" | tr ' ' '\n' | grep -n "^${ORIGINAL_VERSION}$" | cut -d: -f1)
echo "CURRENT_INDEX: $CURRENT_INDEX"
# Loop through each version in the release versions list after the current index
# 1) echo "$RELEASE_VERSIONS" | tr ' ' '\n'
# Same as above, this gets each version on a new line.
Expand Down
2 changes: 1 addition & 1 deletion docker-metadata/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ runs:
labels="$labels
org.opencontainers.image.url=${{ inputs.url }}"
fi
# Clean up labels and set output
labels="${labels//'%'/'%25'}"
labels="${labels//$'\n'/'%0A'}"
Expand Down
18 changes: 4 additions & 14 deletions ec2-linux-runner/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,60 +18,50 @@ inputs:
instance-type:
description: EC2 Instance Type
required: false
type: string
default: t3.medium

instance-volume-size:
description: Volume size for EC2 Instance
required: false
type: number
default: 8
default: '8'

subnet-id:
description: VPC Subnet Id
required: false
type: string
default: subnet-009c04af0177247e8

security-group-id:
description: Security Group ID
required: false
type: string
default: sg-010daba499648d1e7

github-token:
description: GitHub Token
type: string
required: true

label:
description: EC2 Runner Label
required: false
type: string
default:
default: ''

ec2-instance-id:
description: EC2 Runner ID
required: false
type: string
default:
default: ''

aws-nfs-logging:
description: Flag for enabling or disabling NFS logging
required: false
type: boolean
default: false
default: 'false'

aws-nfs-host:
description: NFS host in AWS for logging
required: false
type: string
default: fs-0f9f29caae5ade69c.efs.eu-west-1.amazonaws.com

github-runner-version:
description: GitHub runner releases version
required: false
type: string
default: 2.304.0

outputs:
Expand Down
2 changes: 1 addition & 1 deletion gh-metadata/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ runs:
echo "version=${branch//\//-}-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
echo "sha=${sha}" >> $GITHUB_OUTPUT
else
echo "::error ::Unkown case: current build is neither a tag, a branch or a pull request"
echo "::error ::Unknown case: current build is neither a tag, a branch or a pull request"
exit 1
fi
shell: bash
Expand Down
8 changes: 4 additions & 4 deletions helm/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# helm

See the [Vault helm workflow](.github/workflows/vault_helm_lint_publish.yml) as an example.
See the [Vault helm workflow](.github/workflows/vault_helm_lint_publish.yml) as an example.

It is combining below actions to meet Vault needs.

Please create your own reusable workflow matching your need

## helm-conform action

Check the chart conformity with K8 version using https://github.com/yannh/kubeconform
Check the chart conformity with K8 version using <https://github.com/yannh/kubeconform>

```yaml
- name: Verify conformity
Expand All @@ -24,7 +24,7 @@ Here is the schemas-path [documentation](https://github.com/yannh/kubeconform#ov

## helm-lint action

Lint the helm chart using https://github.com/helm/chart-testing
Lint the helm chart using <https://github.com/helm/chart-testing>

```yaml
- name: Run lint on chart
Expand Down Expand Up @@ -54,7 +54,7 @@ It need `secrets: inherit` to be used within another workflow
## argocd-test action

Test that the helm chart in argocd/base renders.
Also verify the comformity of the ressources.
Also verify the comformity of the resources.

```yaml
- uses: LedgerHQ/actions/helm/argocd-test@main
Expand Down
2 changes: 1 addition & 1 deletion helm/argocd-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ inputs:
description: Specify the github token to login to ghcr.io
required: true
helm-version:
description:
description: Helm version
required: true
default: "v3.13.3"
kubernetes-tested-version:
Expand Down
4 changes: 2 additions & 2 deletions helm/conform/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "Run Kubeconform"
description: "Run Kubeconform againt specified K8S version."
description: "Run Kubeconform against specified K8S version."

inputs:
kubernetes-version:
Expand Down Expand Up @@ -30,7 +30,7 @@ runs:
env:
KUBECONFORM_VERSION: ${{ inputs.kuberconform-version }}
KUBECONFORM_BASE_URL: "https://github.com/yannh/kubeconform/releases/download"
run: |
run: |
set -o pipefail
OS=$(uname)
curl -sSfL "${KUBECONFORM_BASE_URL}/${KUBECONFORM_VERSION}/kubeconform-${OS}-amd64.tar.gz" |
Expand Down
1 change: 0 additions & 1 deletion pdm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ Provides some reusable PDM actions.
| [Test (`test`)](test/) | Execute test using `pdm` scripts |
| [Build documentation (`doc/build`)](doc/build/) | Build the documentation using `pdm` commands |
| [Publish documentation (`doc/publish`)](doc/publish/) | Publish the documentation |

3 changes: 0 additions & 3 deletions pdm/doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,8 @@ jobs:
| `init` | Clone & sync | `true` | `false` |
| `python-version` | Python version used to build | `3.11` | `false` |


## Outputs

| Output | Description |
|--------|-------------|
| `url` | The published documentation URL |


6 changes: 3 additions & 3 deletions pdm/doc/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ inputs:
required: false
openapi:
description: Has OpenAPI specs
default: false
default: 'false'
site:
description: Publish a documentation site
default: false
default: 'false'
pypi-token:
description: A read token for private PyPI access
required: false
init:
description: Clone & sync
default: true
default: 'true'
python-version:
description: Python version used to build
required: false
Expand Down
2 changes: 0 additions & 2 deletions pdm/doc/build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ jobs:
| `group` | Dependency group(s) to install | `docs` | `false` |
| `exclude-group` | Dependency group(s) to exclude from install | `""` | `false` |


## Outputs

N/A

12 changes: 6 additions & 6 deletions pdm/doc/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ inputs:
required: false
openapi:
description: Whether or not to build OpenAPI specs
default: false
default: 'false'
site:
description: Whether or not to build a documentation site
default: false
default: 'false'
init:
description: Clone & sync
default: true
default: 'true'
group:
description: Dependency group(s) to install
default: docs
Expand All @@ -42,7 +42,7 @@ runs:
# Failsafe changelog too avoid failure when there is no update
run: pdm changelog || true
env:
FORCE_COLOR: true
FORCE_COLOR: 'true'
shell: bash

- name: Upload the CHANGELOG
Expand All @@ -55,7 +55,7 @@ runs:
if: inputs.openapi == 'true'
run: pdm doc:openapi
env:
FORCE_COLOR: true
FORCE_COLOR: 'true'
shell: bash

- name: Upload the OpenAPI specifications
Expand All @@ -69,7 +69,7 @@ runs:
if: inputs.site == 'true'
run: pdm doc:build
env:
FORCE_COLOR: true
FORCE_COLOR: 'true'
shell: bash

- name: Upload the generated documentation
Expand Down
3 changes: 0 additions & 3 deletions pdm/doc/publish/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,8 @@ jobs:
| `group` | Dependency group(s) to install | `docs` | `false` |
| `exclude-group` | Dependency group(s) to exclude from install | `""` | `false` |


## Outputs

| Output | Description |
|--------|-------------|
| `url` | The published documentation URL |


10 changes: 5 additions & 5 deletions pdm/doc/publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ inputs:
required: false
openapi:
description: Has OpenAPI specs
default: false
default: 'false'
site:
description: Publish a documentation site
default: false
default: 'false'
pypi-token:
description: A read token for private PyPI access
required: false
init:
description: Clone & sync
default: true
default: 'true'
group:
description: Dependency group(s) to install
default: docs
Expand Down Expand Up @@ -55,14 +55,14 @@ runs:
if: inputs.site == 'true' && github.ref == 'refs/heads/main'
run: pdm doc:deploy --push --update-aliases main latest
env:
FORCE_COLOR: true
FORCE_COLOR: 'true'
shell: bash

- name: Deploy the documentation site (tag)
if: inputs.site == 'true' && inputs.version || startsWith(github.ref, 'refs/tags')
run: pdm doc:deploy --push ${{ inputs.version || github.head_ref || github.ref_name }}
env:
FORCE_COLOR: true
FORCE_COLOR: 'true'
shell: bash

- name: Publish summary
Expand Down
5 changes: 1 addition & 4 deletions pdm/docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,14 @@ jobs:

| Input | Description | Default | Required |
|-------|-------------|---------|----------|
| `clone` | Wether to clone or not | `true` | `false` |
| `clone` | Whether to clone or not | `true` | `false` |
| `version` | Force the built version | `""` | `false` |
| `pypi-token` | A Token to Ledger private PyPI with read permissions | `""` | `true` |
| `github-token` | A Github token with proper permissions | `""` | `false` |


## Outputs

| Output | Description |
|--------|-------------|
| `image` | The published docker image |
| `digest` | The published docker image digest |


4 changes: 2 additions & 2 deletions pdm/docker/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ description: Build Docker image

inputs:
clone:
description: Wether to clone or not
default: true
description: Whether to clone or not
default: 'true'
version:
description: Force the built version
pypi-token:
Expand Down
15 changes: 6 additions & 9 deletions pdm/init/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,13 @@ jobs:
| `pypi-token` | Private PyPI token (read) | `""` | `false` |
| `github-token` | A Github token with proper permissions | `${{ github.token }}` | `false` |


## Outputs

| Output | Description |
|--------|-------------|
| `has_tests` | Wether the project has tests exposed through the `test` command |
| `has_coverage` | Wether the project has tests with coverage exposed through the `cover` command |
| `has_docs` | Wether the project has a documentation exposed through the `doc` command |
| `has_openapi` | Wether the project has an OpenAPI specification exposed through the `doc:openapi` command |
| `has_docker` | Wether the project a Docker image (aka. a `Dockerfile` present at root) |
| `has_src` | Wether the project is using a `src` layout or not |


| `has_tests` | Whether the project has tests exposed through the `test` command |
| `has_coverage` | Whether the project has tests with coverage exposed through the `cover` command |
| `has_docs` | Whether the project has a documentation exposed through the `doc` command |
| `has_openapi` | Whether the project has an OpenAPI specification exposed through the `doc:openapi` command |
| `has_docker` | Whether the project a Docker image (aka. a `Dockerfile` present at root) |
| `has_src` | Whether the project is using a `src` layout or not |

0 comments on commit 9fbe426

Please sign in to comment.