mirror of
https://github.com/ivuorinen/actions.git
synced 2026-03-04 16:54:45 +00:00
chore: add tests, update docs and actions (#299)
* docs: update documentation * feat: validate-inputs has it's own pyproject * security: mask DOCKERHUB_PASSWORD * chore: add tokens, checkout, recrete docs, integration tests * fix: add `statuses: write` permission to pr-lint
This commit is contained in:
@@ -23,6 +23,7 @@ Run golangci-lint with advanced configuration, caching, and reporting
|
||||
| `disable-all` | <p>Disable all linters (useful with --enable-\*)</p> | `false` | `false` |
|
||||
| `enable-linters` | <p>Comma-separated list of linters to enable</p> | `false` | `""` |
|
||||
| `disable-linters` | <p>Comma-separated list of linters to disable</p> | `false` | `""` |
|
||||
| `token` | <p>GitHub token for authentication</p> | `false` | `""` |
|
||||
|
||||
### Outputs
|
||||
|
||||
@@ -119,4 +120,10 @@ This action is a `composite` action.
|
||||
#
|
||||
# Required: false
|
||||
# Default: ""
|
||||
|
||||
token:
|
||||
# GitHub token for authentication
|
||||
#
|
||||
# Required: false
|
||||
# Default: ""
|
||||
```
|
||||
|
||||
@@ -62,6 +62,10 @@ inputs:
|
||||
disable-linters:
|
||||
description: 'Comma-separated list of linters to disable'
|
||||
required: false
|
||||
token:
|
||||
description: 'GitHub token for authentication'
|
||||
required: false
|
||||
default: ''
|
||||
|
||||
outputs:
|
||||
error-count:
|
||||
@@ -199,6 +203,11 @@ runs:
|
||||
go-version: ${{ inputs.go-version }}
|
||||
cache: true
|
||||
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
token: ${{ inputs.token || github.token }}
|
||||
|
||||
- name: Set up Cache
|
||||
id: cache
|
||||
if: inputs.cache == 'true'
|
||||
@@ -394,7 +403,7 @@ runs:
|
||||
|
||||
- name: Upload Lint Results
|
||||
if: always() && inputs.report-format == 'sarif'
|
||||
uses: github/codeql-action/upload-sarif@f443b600d91635bebf5b0d9ebc620189c0d6fba5 # v4.30.8
|
||||
uses: github/codeql-action/upload-sarif@16140ae1a102900babc80a33c44059580f687047 # v4.30.9
|
||||
with:
|
||||
sarif_file: ${{ inputs.working-directory }}/reports/golangci-lint.sarif
|
||||
category: golangci-lint
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Validation rules for go-lint action
|
||||
# Generated by update-validators.py v1.0.0 - DO NOT EDIT MANUALLY
|
||||
# Schema version: 1.0
|
||||
# Coverage: 100% (13/13 inputs)
|
||||
# Coverage: 100% (14/14 inputs)
|
||||
#
|
||||
# This file defines validation rules for the go-lint GitHub Action.
|
||||
# Rules are automatically applied by validate-inputs action when this
|
||||
@@ -27,6 +27,7 @@ optional_inputs:
|
||||
- only-new-issues
|
||||
- report-format
|
||||
- timeout
|
||||
- token
|
||||
- working-directory
|
||||
conventions:
|
||||
cache: boolean
|
||||
@@ -41,14 +42,15 @@ conventions:
|
||||
only-new-issues: branch_name
|
||||
report-format: report_format
|
||||
timeout: numeric_range_1_3600
|
||||
token: github_token
|
||||
working-directory: file_path
|
||||
overrides:
|
||||
go-version: go_version
|
||||
only-new-issues: boolean
|
||||
timeout: timeout_with_unit
|
||||
statistics:
|
||||
total_inputs: 13
|
||||
validated_inputs: 13
|
||||
total_inputs: 14
|
||||
validated_inputs: 14
|
||||
skipped_inputs: 0
|
||||
coverage_percentage: 100
|
||||
validation_coverage: 100
|
||||
@@ -56,7 +58,7 @@ auto_detected: true
|
||||
manual_review_required: false
|
||||
quality_indicators:
|
||||
has_required_inputs: false
|
||||
has_token_validation: false
|
||||
has_token_validation: true
|
||||
has_version_validation: true
|
||||
has_file_validation: true
|
||||
has_security_validation: false
|
||||
has_security_validation: true
|
||||
|
||||
Reference in New Issue
Block a user