chore: markdown-table-formatter and formatting

This commit is contained in:
2025-02-09 03:07:31 +02:00
parent 7cd731f718
commit a44f1431dd
30 changed files with 80 additions and 69 deletions

View File

@@ -9,3 +9,5 @@ rules:
check-keys: false check-keys: false
comments: comments:
min-spaces-from-content: 1 min-spaces-from-content: 1
trailing-spaces:
level: warning

View File

@@ -9,7 +9,7 @@ Standardized caching strategy for all actions
### Inputs ### Inputs
| name | description | required | default | | name | description | required | default |
| -------------- | ---------------------------------------------------- | -------- | ------- | |----------------|------------------------------------------------------|----------|---------|
| `type` | <p>Type of cache (npm, composer, go, pip, etc.)</p> | `true` | `""` | | `type` | <p>Type of cache (npm, composer, go, pip, etc.)</p> | `true` | `""` |
| `paths` | <p>Paths to cache (comma-separated)</p> | `true` | `""` | | `paths` | <p>Paths to cache (comma-separated)</p> | `true` | `""` |
| `key-prefix` | <p>Custom prefix for cache key</p> | `false` | `""` | | `key-prefix` | <p>Custom prefix for cache key</p> | `false` | `""` |
@@ -20,7 +20,7 @@ Standardized caching strategy for all actions
### Outputs ### Outputs
| name | description | | name | description |
| ------------- | --------------------------- | |---------------|-----------------------------|
| `cache-hit` | <p>Cache hit indicator</p> | | `cache-hit` | <p>Cache hit indicator</p> |
| `cache-key` | <p>Generated cache key</p> | | `cache-key` | <p>Generated cache key</p> |
| `cache-paths` | <p>Resolved cache paths</p> | | `cache-paths` | <p>Resolved cache paths</p> |

View File

@@ -10,13 +10,13 @@ Emits an output 'found' which is true or false.
### Inputs ### Inputs
| name | description | required | default | | name | description | required | default |
| -------------- | --------------------------------------- | -------- | ------- | |----------------|-----------------------------------------|----------|---------|
| `file-pattern` | <p>Glob pattern for files to check.</p> | `true` | `""` | | `file-pattern` | <p>Glob pattern for files to check.</p> | `true` | `""` |
### Outputs ### Outputs
| name | description | | name | description |
| ------- | -------------------------------------------------------------- | |---------|----------------------------------------------------------------|
| `found` | <p>Indicates if the files matching the pattern were found.</p> | | `found` | <p>Indicates if the files matching the pattern were found.</p> |
### Runs ### Runs

View File

@@ -9,7 +9,7 @@ Builds and tests C# projects.
### Inputs ### Inputs
| name | description | required | default | | name | description | required | default |
| ---------------- | ---------------------------------- | -------- | ------- | |------------------|------------------------------------|----------|---------|
| `dotnet-version` | <p>Version of .NET SDK to use.</p> | `false` | `""` | | `dotnet-version` | <p>Version of .NET SDK to use.</p> | `false` | `""` |
### Runs ### Runs

View File

@@ -9,7 +9,7 @@ Runs linters like StyleCop or dotnet-format for C# code style checks.
### Inputs ### Inputs
| name | description | required | default | | name | description | required | default |
| ---------------- | ---------------------------------- | -------- | ------- | |------------------|------------------------------------|----------|---------|
| `dotnet-version` | <p>Version of .NET SDK to use.</p> | `false` | `""` | | `dotnet-version` | <p>Version of .NET SDK to use.</p> | `false` | `""` |
### Runs ### Runs

View File

@@ -9,7 +9,7 @@ Publishes a C# project to GitHub Packages.
### Inputs ### Inputs
| name | description | required | default | | name | description | required | default |
| ---------------- | ---------------------------------------- | -------- | ----------- | |------------------|------------------------------------------|----------|-------------|
| `dotnet-version` | <p>Version of .NET SDK to use.</p> | `false` | `""` | | `dotnet-version` | <p>Version of .NET SDK to use.</p> | `false` | `""` |
| `namespace` | <p>GitHub namespace for the package.</p> | `true` | `ivuorinen` | | `namespace` | <p>GitHub namespace for the package.</p> | `true` | `ivuorinen` |

View File

@@ -9,7 +9,7 @@ Builds a Docker image for multiple architectures with enhanced security and reli
### Inputs ### Inputs
| name | description | required | default | | name | description | required | default |
| --------------- | ----------------------------------------------------------------------------------- | -------- | --------------------------------------------------- | |-----------------|-------------------------------------------------------------------------------------|----------|-----------------------------------------------------|
| `image-name` | <p>The name of the Docker image to build. Defaults to the repository name.</p> | `false` | `""` | | `image-name` | <p>The name of the Docker image to build. Defaults to the repository name.</p> | `false` | `""` |
| `tag` | <p>The tag for the Docker image. Must follow semver or valid Docker tag format.</p> | `true` | `""` | | `tag` | <p>The tag for the Docker image. Must follow semver or valid Docker tag format.</p> | `true` | `""` |
| `architectures` | <p>Comma-separated list of architectures to build for.</p> | `false` | `linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6` | | `architectures` | <p>Comma-separated list of architectures to build for.</p> | `false` | `linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6` |
@@ -23,7 +23,7 @@ Builds a Docker image for multiple architectures with enhanced security and reli
### Outputs ### Outputs
| name | description | | name | description |
| -------------- | ------------------------------------ | |----------------|--------------------------------------|
| `image-digest` | <p>The digest of the built image</p> | | `image-digest` | <p>The digest of the built image</p> |
| `metadata` | <p>Build metadata in JSON format</p> | | `metadata` | <p>Build metadata in JSON format</p> |
| `platforms` | <p>Successfully built platforms</p> | | `platforms` | <p>Successfully built platforms</p> |

View File

@@ -9,7 +9,7 @@ Publishes a Docker image to GitHub Packages with advanced security and reliabili
### Inputs ### Inputs
| name | description | required | default | | name | description | required | default |
| ------------- | -------------------------------------------------------------------------------- | -------- | ------------------------- | |---------------|----------------------------------------------------------------------------------|----------|---------------------------|
| `image-name` | <p>The name of the Docker image to publish. Defaults to the repository name.</p> | `false` | `""` | | `image-name` | <p>The name of the Docker image to publish. Defaults to the repository name.</p> | `false` | `""` |
| `tags` | <p>Comma-separated list of tags for the Docker image.</p> | `true` | `""` | | `tags` | <p>Comma-separated list of tags for the Docker image.</p> | `true` | `""` |
| `platforms` | <p>Platforms to publish (comma-separated). Defaults to amd64 and arm64.</p> | `false` | `linux/amd64,linux/arm64` | | `platforms` | <p>Platforms to publish (comma-separated). Defaults to amd64 and arm64.</p> | `false` | `linux/amd64,linux/arm64` |
@@ -23,7 +23,7 @@ Publishes a Docker image to GitHub Packages with advanced security and reliabili
### Outputs ### Outputs
| name | description | | name | description |
| ------------ | ----------------------------------------- | |--------------|-------------------------------------------|
| `image-name` | <p>Full image name including registry</p> | | `image-name` | <p>Full image name including registry</p> |
| `digest` | <p>The digest of the published image</p> | | `digest` | <p>The digest of the published image</p> |
| `tags` | <p>List of published tags</p> | | `tags` | <p>List of published tags</p> |

View File

@@ -9,7 +9,7 @@ Publishes a Docker image to Docker Hub with enhanced security and reliability fe
### Inputs ### Inputs
| name | description | required | default | | name | description | required | default |
| ------------------------ | -------------------------------------------------------------------------------- | -------- | ------------------------- | |--------------------------|----------------------------------------------------------------------------------|----------|---------------------------|
| `image-name` | <p>The name of the Docker image to publish. Defaults to the repository name.</p> | `false` | `""` | | `image-name` | <p>The name of the Docker image to publish. Defaults to the repository name.</p> | `false` | `""` |
| `tags` | <p>Comma-separated list of tags for the Docker image.</p> | `true` | `""` | | `tags` | <p>Comma-separated list of tags for the Docker image.</p> | `true` | `""` |
| `platforms` | <p>Platforms to publish (comma-separated). Defaults to amd64 and arm64.</p> | `false` | `linux/amd64,linux/arm64` | | `platforms` | <p>Platforms to publish (comma-separated). Defaults to amd64 and arm64.</p> | `false` | `linux/amd64,linux/arm64` |
@@ -25,7 +25,7 @@ Publishes a Docker image to Docker Hub with enhanced security and reliability fe
### Outputs ### Outputs
| name | description | | name | description |
| ------------ | ----------------------------------------- | |--------------|-------------------------------------------|
| `image-name` | <p>Full image name including registry</p> | | `image-name` | <p>Full image name including registry</p> |
| `digest` | <p>The digest of the published image</p> | | `digest` | <p>The digest of the published image</p> |
| `tags` | <p>List of published tags</p> | | `tags` | <p>List of published tags</p> |

View File

@@ -9,14 +9,14 @@ Publish a Docker image to GitHub Packages and Docker Hub.
### Inputs ### Inputs
| name | description | required | default | | name | description | required | default |
| ---------- | ----------------------------------------------------------- | -------- | ------- | |------------|-------------------------------------------------------------|----------|---------|
| `registry` | <p>Registry to publish to (dockerhub, github, or both).</p> | `true` | `both` | | `registry` | <p>Registry to publish to (dockerhub, github, or both).</p> | `true` | `both` |
| `nightly` | <p>Is this a nightly build? (true or false)</p> | `false` | `false` | | `nightly` | <p>Is this a nightly build? (true or false)</p> | `false` | `false` |
### Outputs ### Outputs
| name | description | | name | description |
| ---------- | ----------------------------------------- | |------------|-------------------------------------------|
| `registry` | <p>Registry where image was published</p> | | `registry` | <p>Registry where image was published</p> |
### Runs ### Runs

View File

@@ -9,13 +9,13 @@ Detects .NET SDK version from global.json or defaults to a specified version.
### Inputs ### Inputs
| name | description | required | default | | name | description | required | default |
| ----------------- | ------------------------------------------------------------------- | -------- | ------- | |-------------------|---------------------------------------------------------------------|----------|---------|
| `default-version` | <p>Default .NET SDK version to use if global.json is not found.</p> | `true` | `7.0` | | `default-version` | <p>Default .NET SDK version to use if global.json is not found.</p> | `true` | `7.0` |
### Outputs ### Outputs
| name | description | | name | description |
| ---------------- | -------------------------------------------- | |------------------|----------------------------------------------|
| `dotnet-version` | <p>Detected or default .NET SDK version.</p> | | `dotnet-version` | <p>Detected or default .NET SDK version.</p> |
### Runs ### Runs

View File

@@ -9,7 +9,7 @@ Run ESLint check on the repository with advanced configuration and reporting
### Inputs ### Inputs
| name | description | required | default | | name | description | required | default |
| ------------------- | ------------------------------------------------ | -------- | ------------------- | |---------------------|--------------------------------------------------|----------|---------------------|
| `working-directory` | <p>Directory containing files to lint</p> | `false` | `.` | | `working-directory` | <p>Directory containing files to lint</p> | `false` | `.` |
| `eslint-version` | <p>ESLint version to use</p> | `false` | `latest` | | `eslint-version` | <p>ESLint version to use</p> | `false` | `latest` |
| `config-file` | <p>Path to ESLint config file</p> | `false` | `.eslintrc` | | `config-file` | <p>Path to ESLint config file</p> | `false` | `.eslintrc` |
@@ -24,7 +24,7 @@ Run ESLint check on the repository with advanced configuration and reporting
### Outputs ### Outputs
| name | description | | name | description |
| --------------- | -------------------------------- | |-----------------|----------------------------------|
| `error-count` | <p>Number of errors found</p> | | `error-count` | <p>Number of errors found</p> |
| `warning-count` | <p>Number of warnings found</p> | | `warning-count` | <p>Number of warnings found</p> |
| `sarif-file` | <p>Path to SARIF report file</p> | | `sarif-file` | <p>Path to SARIF report file</p> |

View File

@@ -9,7 +9,7 @@ Creates a GitHub release with a version and changelog.
### Inputs ### Inputs
| name | description | required | default | | name | description | required | default |
| ----------- | ---------------------------------------------------- | -------- | ------- | |-------------|------------------------------------------------------|----------|---------|
| `version` | <p>The version for the release.</p> | `true` | `""` | | `version` | <p>The version for the release.</p> | `true` | `""` |
| `changelog` | <p>The changelog or description for the release.</p> | `false` | `""` | | `changelog` | <p>The changelog or description for the release.</p> | `false` | `""` |

View File

@@ -9,7 +9,7 @@ Builds the Go project.
### Inputs ### Inputs
| name | description | required | default | | name | description | required | default |
| ------------- | ----------------------------------- | -------- | ------- | |---------------|-------------------------------------|----------|---------|
| `go-version` | <p>Go version to use.</p> | `false` | `""` | | `go-version` | <p>Go version to use.</p> | `false` | `""` |
| `destination` | <p>Build destination directory.</p> | `false` | `./bin` | | `destination` | <p>Build destination directory.</p> | `false` | `./bin` |

View File

@@ -9,7 +9,7 @@ Run golangci-lint with advanced configuration, caching, and reporting
### Inputs ### Inputs
| name | description | required | default | | name | description | required | default |
| ----------------------- | ---------------------------------------------------- | -------- | --------------- | |-------------------------|------------------------------------------------------|----------|-----------------|
| `working-directory` | <p>Directory containing Go files</p> | `false` | `.` | | `working-directory` | <p>Directory containing Go files</p> | `false` | `.` |
| `golangci-lint-version` | <p>Version of golangci-lint to use</p> | `false` | `latest` | | `golangci-lint-version` | <p>Version of golangci-lint to use</p> | `false` | `latest` |
| `go-version` | <p>Go version to use</p> | `false` | `stable` | | `go-version` | <p>Go version to use</p> | `false` | `stable` |
@@ -27,7 +27,7 @@ Run golangci-lint with advanced configuration, caching, and reporting
### Outputs ### Outputs
| name | description | | name | description |
| ---------------- | ----------------------------------------- | |------------------|-------------------------------------------|
| `error-count` | <p>Number of errors found</p> | | `error-count` | <p>Number of errors found</p> |
| `sarif-file` | <p>Path to SARIF report file</p> | | `sarif-file` | <p>Path to SARIF report file</p> |
| `cache-hit` | <p>Indicates if there was a cache hit</p> | | `cache-hit` | <p>Indicates if there was a cache hit</p> |

View File

@@ -9,13 +9,13 @@ Detects the Go version from the project's go.mod file or defaults to a specified
### Inputs ### Inputs
| name | description | required | default | | name | description | required | default |
| ----------------- | -------------------------------------------------------- | -------- | ------- | |-------------------|----------------------------------------------------------|----------|---------|
| `default-version` | <p>Default Go version to use if go.mod is not found.</p> | `false` | `1.22` | | `default-version` | <p>Default Go version to use if go.mod is not found.</p> | `false` | `1.22` |
### Outputs ### Outputs
| name | description | | name | description |
| ------------ | -------------------------------------- | |--------------|----------------------------------------|
| `go-version` | <p>Detected or default Go version.</p> | | `go-version` | <p>Detected or default Go version.</p> |
### Runs ### Runs

View File

@@ -9,7 +9,7 @@ Sets up Node.js environment with advanced version management, caching, and tooli
### Inputs ### Inputs
| name | description | required | default | | name | description | required | default |
| ----------------- | ------------------------------------------------------------------------ | -------- | ---------------------------- | |-------------------|--------------------------------------------------------------------------|----------|------------------------------|
| `default-version` | <p>Default Node.js version to use if no configuration file is found.</p> | `false` | `22` | | `default-version` | <p>Default Node.js version to use if no configuration file is found.</p> | `false` | `22` |
| `package-manager` | <p>Node.js package manager to use (npm, yarn, pnpm)</p> | `false` | `npm` | | `package-manager` | <p>Node.js package manager to use (npm, yarn, pnpm)</p> | `false` | `npm` |
| `registry-url` | <p>Custom NPM registry URL</p> | `false` | `https://registry.npmjs.org` | | `registry-url` | <p>Custom NPM registry URL</p> | `false` | `https://registry.npmjs.org` |
@@ -22,7 +22,7 @@ Sets up Node.js environment with advanced version management, caching, and tooli
### Outputs ### Outputs
| name | description | | name | description |
| ----------------- | ----------------------------------------- | |-------------------|-------------------------------------------|
| `node-version` | <p>Installed Node.js version</p> | | `node-version` | <p>Installed Node.js version</p> |
| `package-manager` | <p>Selected package manager</p> | | `package-manager` | <p>Selected package manager</p> |
| `cache-hit` | <p>Indicates if there was a cache hit</p> | | `cache-hit` | <p>Indicates if there was a cache hit</p> |

View File

@@ -9,7 +9,7 @@ Publishes the package to the NPM registry with configurable scope and registry U
### Inputs ### Inputs
| name | description | required | default | | name | description | required | default |
| ----------------- | ----------------------------------- | -------- | -------------------------------------- | |-------------------|-------------------------------------|----------|----------------------------------------|
| `registry-url` | <p>Registry URL for publishing.</p> | `false` | `https://registry.npmjs.org/` | | `registry-url` | <p>Registry URL for publishing.</p> | `false` | `https://registry.npmjs.org/` |
| `scope` | <p>Package scope to use.</p> | `false` | `@ivuorinen` | | `scope` | <p>Package scope to use.</p> | `false` | `@ivuorinen` |
| `package-version` | <p>The version to publish.</p> | `false` | `${{ github.event.release.tag_name }}` | | `package-version` | <p>The version to publish.</p> | `false` | `${{ github.event.release.tag_name }}` |

View File

@@ -9,7 +9,7 @@ Runs Composer install on a repository with advanced caching and configuration.
### Inputs ### Inputs
| name | description | required | default | | name | description | required | default |
| ------------------- | ------------------------------------------------------------- | -------- | --------------------------------------------------- | |---------------------|---------------------------------------------------------------|----------|-----------------------------------------------------|
| `php` | <p>PHP Version to use.</p> | `true` | `8.4` | | `php` | <p>PHP Version to use.</p> | `true` | `8.4` |
| `extensions` | <p>Comma-separated list of PHP extensions to install</p> | `false` | `mbstring, xml, zip, curl, json` | | `extensions` | <p>Comma-separated list of PHP extensions to install</p> | `false` | `mbstring, xml, zip, curl, json` |
| `tools` | <p>Comma-separated list of Composer tools to install</p> | `false` | `composer:v2` | | `tools` | <p>Comma-separated list of Composer tools to install</p> | `false` | `composer:v2` |
@@ -23,7 +23,7 @@ Runs Composer install on a repository with advanced caching and configuration.
### Outputs ### Outputs
| name | description | | name | description |
| ------------------ | ----------------------------------------------- | |--------------------|-------------------------------------------------|
| `lock` | <p>composer.lock or composer.json file hash</p> | | `lock` | <p>composer.lock or composer.json file hash</p> |
| `php-version` | <p>Installed PHP version</p> | | `php-version` | <p>Installed PHP version</p> |
| `composer-version` | <p>Installed Composer version</p> | | `composer-version` | <p>Installed Composer version</p> |

View File

@@ -9,7 +9,7 @@ Setup PHP, install dependencies, generate key, create database and run composer
### Inputs ### Inputs
| name | description | required | default | | name | description | required | default |
| ------------------ | --------------------------------------------------------------------------------------------------------------------- | -------- | ------------------------------------------- | |--------------------|-----------------------------------------------------------------------------------------------------------------------|----------|---------------------------------------------|
| `php-version` | <p>PHP Version to use, see https://github.com/marketplace/actions/setup-php-action#php-version-optional</p> | `false` | `latest` | | `php-version` | <p>PHP Version to use, see https://github.com/marketplace/actions/setup-php-action#php-version-optional</p> | `false` | `latest` |
| `php-version-file` | <p>PHP Version file to use, see https://github.com/marketplace/actions/setup-php-action#php-version-file-optional</p> | `false` | `.php-version` | | `php-version-file` | <p>PHP Version file to use, see https://github.com/marketplace/actions/setup-php-action#php-version-file-optional</p> | `false` | `.php-version` |
| `extensions` | <p>PHP extensions to install, see https://github.com/marketplace/actions/setup-php-action#extensions-optional</p> | `false` | `mbstring, intl, json, pdo_sqlite, sqlite3` | | `extensions` | <p>PHP extensions to install, see https://github.com/marketplace/actions/setup-php-action#extensions-optional</p> | `false` | `mbstring, intl, json, pdo_sqlite, sqlite3` |
@@ -18,7 +18,7 @@ Setup PHP, install dependencies, generate key, create database and run composer
### Outputs ### Outputs
| name | description | | name | description |
| ------------------ | ---------------------------------------------- | |--------------------|------------------------------------------------|
| `php-version` | <p>The PHP version that was setup</p> | | `php-version` | <p>The PHP version that was setup</p> |
| `php-version-file` | <p>The PHP version file that was used</p> | | `php-version-file` | <p>The PHP version file that was used</p> |
| `extensions` | <p>The PHP extensions that were installed</p> | | `extensions` | <p>The PHP extensions that were installed</p> |

View File

@@ -9,7 +9,7 @@ Runs pre-commit on the repository and pushes the fixes back to the repository
### Inputs ### Inputs
| name | description | required | default | | name | description | required | default |
| ------------------- | ------------------------------------- | -------- | --------------------------- | |---------------------|---------------------------------------|----------|-----------------------------|
| `pre-commit-config` | <p>pre-commit configuration file</p> | `false` | `.pre-commit-config.yaml` | | `pre-commit-config` | <p>pre-commit configuration file</p> | `false` | `.pre-commit-config.yaml` |
| `base-branch` | <p>Base branch to compare against</p> | `false` | `""` | | `base-branch` | <p>Base branch to compare against</p> | `false` | `""` |
| `token` | <p>GitHub Token</p> | `false` | `${{ github.token }}` | | `token` | <p>GitHub Token</p> | `false` | `${{ github.token }}` |

View File

@@ -9,7 +9,7 @@ Run Prettier check on the repository with advanced configuration and reporting
### Inputs ### Inputs
| name | description | required | default | | name | description | required | default |
| ------------------- | ---------------------------------------------------------- | -------- | ------------------------------------------------ | |---------------------|------------------------------------------------------------|----------|--------------------------------------------------|
| `working-directory` | <p>Directory containing files to check</p> | `false` | `.` | | `working-directory` | <p>Directory containing files to check</p> | `false` | `.` |
| `prettier-version` | <p>Prettier version to use</p> | `false` | `latest` | | `prettier-version` | <p>Prettier version to use</p> | `false` | `latest` |
| `config-file` | <p>Path to Prettier config file</p> | `false` | `.prettierrc` | | `config-file` | <p>Path to Prettier config file</p> | `false` | `.prettierrc` |
@@ -25,7 +25,7 @@ Run Prettier check on the repository with advanced configuration and reporting
### Outputs ### Outputs
| name | description | | name | description |
| ------------------- | --------------------------------------------- | |---------------------|-----------------------------------------------|
| `files-checked` | <p>Number of files checked</p> | | `files-checked` | <p>Number of files checked</p> |
| `unformatted-files` | <p>Number of files with formatting issues</p> | | `unformatted-files` | <p>Number of files with formatting issues</p> |
| `sarif-file` | <p>Path to SARIF report file</p> | | `sarif-file` | <p>Path to SARIF report file</p> |

View File

@@ -9,7 +9,7 @@ Lints and fixes Python files, commits changes, and uploads SARIF report.
### Inputs ### Inputs
| name | description | required | default | | name | description | required | default |
| ------------------- | --------------------------------------------------------------------- | -------- | ------- | |---------------------|-----------------------------------------------------------------------|----------|---------|
| `python-version` | <p>Python version to use</p> | `false` | `3.11` | | `python-version` | <p>Python version to use</p> | `false` | `3.11` |
| `flake8-version` | <p>Flake8 version to use</p> | `false` | `7.0.0` | | `flake8-version` | <p>Flake8 version to use</p> | `false` | `7.0.0` |
| `autopep8-version` | <p>Autopep8 version to use</p> | `false` | `2.0.4` | | `autopep8-version` | <p>Autopep8 version to use</p> | `false` | `2.0.4` |
@@ -20,7 +20,7 @@ Lints and fixes Python files, commits changes, and uploads SARIF report.
### Outputs ### Outputs
| name | description | | name | description |
| ------------- | ------------------------------------------------------ | |---------------|--------------------------------------------------------|
| `lint-result` | <p>Result of the linting process (success/failure)</p> | | `lint-result` | <p>Result of the linting process (success/failure)</p> |
| `fixed-files` | <p>Number of files that were fixed</p> | | `fixed-files` | <p>Number of files that were fixed</p> |
| `error-count` | <p>Number of errors found</p> | | `error-count` | <p>Number of errors found</p> |

View File

@@ -9,7 +9,7 @@ Creates a release for the current month, incrementing patch number if necessary.
### Inputs ### Inputs
| name | description | required | default | | name | description | required | default |
| --------- | -------------------------------------------------------- | -------- | --------------------- | |-----------|----------------------------------------------------------|----------|-----------------------|
| `token` | <p>GitHub token with permission to create releases.</p> | `true` | `${{ github.token }}` | | `token` | <p>GitHub token with permission to create releases.</p> | `true` | `${{ github.token }}` |
| `dry-run` | <p>Run in dry-run mode without creating the release.</p> | `false` | `false` | | `dry-run` | <p>Run in dry-run mode without creating the release.</p> | `false` | `false` |
| `prefix` | <p>Optional prefix for release tags.</p> | `false` | `""` | | `prefix` | <p>Optional prefix for release tags.</p> | `false` | `""` |
@@ -17,7 +17,7 @@ Creates a release for the current month, incrementing patch number if necessary.
### Outputs ### Outputs
| name | description | | name | description |
| -------------- | ------------------------------------- | |----------------|---------------------------------------|
| `release-tag` | <p>The tag of the created release</p> | | `release-tag` | <p>The tag of the created release</p> |
| `release-url` | <p>The URL of the created release</p> | | `release-url` | <p>The URL of the created release</p> |
| `previous-tag` | <p>The previous release tag</p> | | `previous-tag` | <p>The previous release tag</p> |

36
run.sh
View File

@@ -14,12 +14,12 @@ handle_error() {
} }
trap 'handle_error $LINENO' ERR trap 'handle_error $LINENO' ERR
echo "🚀 Aloitetaan päivitys $(date)" echo "🚀 Starting update $(date)"
# Check required tools # Check required tools
for cmd in npx sed find grep; do for cmd in npx sed find grep; do
if ! command -v $cmd &>/dev/null; then if ! command -v $cmd &>/dev/null; then
echo "⚠️ Error: $cmd not found" | tee -a "$log_file" echo "- ⚠️ Error: $cmd not found" | tee -a "$log_file"
exit 1 exit 1
fi fi
done done
@@ -42,7 +42,7 @@ find . -mindepth 1 -maxdepth 1 -type d | while read -r dir; do
action="./$dir/action.yml" action="./$dir/action.yml"
if [ -f "$action" ]; then if [ -f "$action" ]; then
echo "📄 Found action.yml in $dir" echo "- 📄 Found action.yml in $dir"
repo="ivuorinen/actions/$dir" repo="ivuorinen/actions/$dir"
readme="./$dir/README.md" readme="./$dir/README.md"
@@ -51,35 +51,36 @@ find . -mindepth 1 -maxdepth 1 -type d | while read -r dir; do
# if version doesn't exist, use 'main' # if version doesn't exist, use 'main'
if [ -z "$version" ]; then if [ -z "$version" ]; then
version="main" version="main"
echo " Version not set in $dir/action.yml, using 'main'" echo "- Version not set in $dir/action.yml, using 'main'"
fi fi
echo "📝 Updating $readme..." echo "- 📝 Updating $readme..."
printf "# %s\n\n" "$repo" >"$readme" printf "# %s\n\n" "$repo" >"$readme"
echo "📄 Generating action documentation..." echo "- 📄 Generating action documentation..."
if ! npx --yes action-docs@latest \ if ! npx --yes action-docs@latest \
--source="$action" \ --source="$action" \
--no-banner \ --no-banner \
--include-name-header >>"$readme"; then --include-name-header >>"$readme"; then
echo "⚠️ Warning: action-docs failed in $dir directory" | tee -a "$log_file" echo "- ⚠️ Warning: action-docs failed in $dir directory" | tee -a "$log_file"
fi fi
echo "🔄 Replacing placeholders in $readme..." echo "- 🔄 Replacing placeholders in $readme..."
$SED_CMD "s|PROJECT|$repo|g; s|VERSION|$version|g; s|\*\*\*||g" "$readme" $SED_CMD "s|PROJECT|$repo|g; s|VERSION|$version|g; s|\*\*\*||g" "$readme"
if [ -f "$readme.bak" ]; then if [ -f "$readme.bak" ]; then
rm "$readme.bak" rm "$readme.bak"
echo "🗑️ Removed $readme.bak" echo "- 🗑️ Removed $readme.bak"
fi fi
else else
# if action doesn't exist, skip # if action doesn't exist, skip
echo "⏩ Skipping $dir - action.yml missing" echo "- ⏩ Skipping $dir - action.yml missing"
fi fi
) || { ) || {
echo "⚠️ Warning: Error processing directory $dir" | tee -a "$log_file" echo "- ⚠️ Warning: Error processing directory $dir" | tee -a "$log_file"
} }
echo ""
done done
echo "" echo ""
@@ -92,14 +93,21 @@ echo ""
echo "✨ Running prettier..." echo "✨ Running prettier..."
if ! npx --yes prettier --write \ if ! npx --yes prettier --write \
"run.sh" "**/README.md" "**/action.yml" ".github/workflows/*.yml"; then "**/README.md" "**/action.yml" ".github/workflows/*.yml"; then
echo "⚠️ Warning: prettier formatting failed" | tee -a "$log_file" echo "- ⚠️ Warning: prettier formatting failed" | tee -a "$log_file"
fi
echo ""
# Run markdown-table-formatter
echo "🔍 Running markdown-table-formatter..."
if ! npx --yes markdown-table-formatter "**/README.md"; then
echo "- ⚠️ Warning: markdown-table-formatter found issues" | tee -a "$log_file"
fi fi
echo "" echo ""
echo "🔎 Running MegaLinter..." echo "🔎 Running MegaLinter..."
if ! npx --yes mega-linter-runner; then if ! npx --yes mega-linter-runner; then
echo "⚠️ Warning: MegaLinter found issues" | tee -a "$log_file" echo "- ⚠️ Warning: MegaLinter found issues" | tee -a "$log_file"
fi fi
echo "" echo ""

View File

@@ -8,19 +8,19 @@ Sets Git configuration for actions.
### Inputs ### Inputs
| name | description | required | default | | name | description | required | default |
| ---------- | ----------------------------------- | -------- | --------------------------- | |--------------|----------------------------------------|----------|-----------------------------|
| `token` | <p>GitHub token.</p> | `false` | `${{ github.token }}` | | `token` | <p>GitHub token.</p> | `false` | `${{ github.token }}` |
| `username` | <p>GitHub username for commits.</p> | `false` | `github-actions` | | `username` | <p>GitHub username for commits.</p> | `false` | `github-actions` |
| `email` | <p>GitHub email for commits.</p> | `false` | `github-actions@github.com` | | `email` | <p>GitHub email for commits.</p> | `false` | `github-actions@github.com` |
### Outputs ### Outputs
| name | description | | name | description |
| ---------- | ----------------------------------- | |--------------|----------------------------------------|
| `token` | <p>GitHub token.</p> | | `token` | <p>GitHub token.</p> |
| `username` | <p>GitHub username for commits.</p> | | `username` | <p>GitHub username for commits.</p> |
| `email` | <p>GitHub email for commits.</p> | | `email` | <p>GitHub email for commits.</p> |
### Runs ### Runs

View File

@@ -36,6 +36,7 @@ runs:
steps: steps:
- name: Check for FIXIMUS_TOKEN - name: Check for FIXIMUS_TOKEN
id: bot id: bot
shell: bash
run: | run: |
if [ -n "${{ secrets.FIXIMUS_TOKEN }}" ]; then if [ -n "${{ secrets.FIXIMUS_TOKEN }}" ]; then
echo "token=${{ secrets.FIXIMUS_TOKEN }}" >> $GITHUB_OUTPUT echo "token=${{ secrets.FIXIMUS_TOKEN }}" >> $GITHUB_OUTPUT
@@ -46,9 +47,9 @@ runs:
echo "username=${{ inputs.username }}" >> $GITHUB_OUTPUT echo "username=${{ inputs.username }}" >> $GITHUB_OUTPUT
echo "email=${{ inputs.email }}" >> $GITHUB_OUTPUT echo "email=${{ inputs.email }}" >> $GITHUB_OUTPUT
fi fi
shell: bash
- name: Configure Git - name: Configure Git
shell: bash
run: | run: |
# Function to clean up Git config # Function to clean up Git config
cleanup_git_config() { cleanup_git_config() {
@@ -72,4 +73,3 @@ runs:
'git@github.com:' 'git@github.com:'
git config --local user.name "${{ steps.bot.outputs.username }}" git config --local user.name "${{ steps.bot.outputs.username }}"
git config --local user.email "${{ steps.bot.outputs.email }}" git config --local user.email "${{ steps.bot.outputs.email }}"
shell: bash

View File

@@ -9,13 +9,13 @@ Sync labels from a YAML file to a GitHub repository
### Inputs ### Inputs
| name | description | required | default | | name | description | required | default |
| -------- | ----------------------------------- | -------- | ------------ | |----------|-------------------------------------|----------|--------------|
| `labels` | <p>Path to the labels YAML file</p> | `true` | `labels.yml` | | `labels` | <p>Path to the labels YAML file</p> | `true` | `labels.yml` |
### Outputs ### Outputs
| name | description | | name | description |
| -------- | ----------------------------------- | |----------|-------------------------------------|
| `labels` | <p>Path to the labels YAML file</p> | | `labels` | <p>Path to the labels YAML file</p> |
### Runs ### Runs

View File

@@ -1,3 +1,4 @@
---
- name: breaking-change - name: breaking-change
color: ee0701 color: ee0701
description: A breaking change for existing users. description: A breaking change for existing users.

View File

@@ -9,7 +9,7 @@ Lints and fixes Terraform files with advanced validation and security checks.
### Inputs ### Inputs
| name | description | required | default | | name | description | required | default |
| ------------------- | -------------------------------------------------------------- | -------- | ------------- | |---------------------|----------------------------------------------------------------|----------|---------------|
| `terraform-version` | <p>Terraform version to use</p> | `false` | `latest` | | `terraform-version` | <p>Terraform version to use</p> | `false` | `latest` |
| `tflint-version` | <p>TFLint version to use</p> | `false` | `latest` | | `tflint-version` | <p>TFLint version to use</p> | `false` | `latest` |
| `working-directory` | <p>Directory containing Terraform files</p> | `false` | `.` | | `working-directory` | <p>Directory containing Terraform files</p> | `false` | `.` |
@@ -22,7 +22,7 @@ Lints and fixes Terraform files with advanced validation and security checks.
### Outputs ### Outputs
| name | description | | name | description |
| ------------- | -------------------------------- | |---------------|----------------------------------|
| `error-count` | <p>Number of errors found</p> | | `error-count` | <p>Number of errors found</p> |
| `fixed-count` | <p>Number of issues fixed</p> | | `fixed-count` | <p>Number of issues fixed</p> |
| `sarif-file` | <p>Path to SARIF report file</p> | | `sarif-file` | <p>Path to SARIF report file</p> |