diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 53188fe..0da2fac 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -11,4 +11,6 @@ updates: - dependencies - github-actions schedule: - interval: weekly + interval: daily + cooldown: + default-days: 7 diff --git a/.github/linters/.jscpd.json b/.github/linters/.jscpd.json deleted file mode 100644 index 88330de..0000000 --- a/.github/linters/.jscpd.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "threshold": 0, - "reporters": [ - "consoleFull" - ], - "ignore": [ - "**/tests/**", - "**/.github/workflows/Action-Test.yml" - ], - "absolute": true -} diff --git a/.github/release.yml b/.github/release.yml deleted file mode 100644 index 35c6ae8..0000000 --- a/.github/release.yml +++ /dev/null @@ -1,18 +0,0 @@ -# https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes#configuring-automatically-generated-release-notes - -changelog: - exclude: - labels: - - NoRelease - categories: - - title: 🌟 Breaking Changes - labels: - - Major - - Breaking - - title: 🚀 New Features - labels: - - Minor - - Feature - - title: Other Changes - labels: - - '*' diff --git a/.github/workflows/Action-Test.yml b/.github/workflows/Action-Test.yml index ef10be0..366492f 100644 --- a/.github/workflows/Action-Test.yml +++ b/.github/workflows/Action-Test.yml @@ -25,7 +25,7 @@ jobs: Conclusion: ${{ steps.action-test.conclusion }} steps: - name: Checkout repo - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false @@ -50,7 +50,7 @@ jobs: Conclusion: ${{ steps.action-test.conclusion }} steps: - name: Checkout repo - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false @@ -76,7 +76,7 @@ jobs: Conclusion: ${{ steps.action-test.conclusion }} steps: - name: Checkout repo - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false @@ -103,7 +103,7 @@ jobs: Conclusion: ${{ steps.action-test.conclusion }} steps: - name: Checkout repo - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false @@ -129,7 +129,7 @@ jobs: Conclusion: ${{ steps.action-test.conclusion }} steps: - name: Checkout repo - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false @@ -169,11 +169,11 @@ jobs: OutputsConclusion: ${{ needs.ActionTestOutputs.outputs.Conclusion }} steps: - name: Checkout repo - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false - name: Aggregated Status - uses: PSModule/Github-Script@v1 + uses: PSModule/GitHub-Script@0097f3bbe3f413f3b577b9bcc600727b0ca3201a # v1.7.10 with: Script: tests/Get-AggregatedStatus.ps1 diff --git a/.github/workflows/Linter.yml b/.github/workflows/Linter.yml index 319e104..c06a3db 100644 --- a/.github/workflows/Linter.yml +++ b/.github/workflows/Linter.yml @@ -19,19 +19,20 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repo - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false fetch-depth: 0 - name: Lint code base - uses: super-linter/super-linter@latest + uses: super-linter/super-linter@d5b0a2ab116623730dd094f15ddc1b6b25bf7b99 # v8.3.2 env: GITHUB_TOKEN: ${{ github.token }} - VALIDATE_JSON_PRETTIER: false - VALIDATE_MARKDOWN_PRETTIER: false - VALIDATE_YAML_PRETTIER: false VALIDATE_BIOME_FORMAT: false VALIDATE_BIOME_LINT: false VALIDATE_GITHUB_ACTIONS_ZIZMOR: false + VALIDATE_JSCPD: false + VALIDATE_JSON_PRETTIER: false + VALIDATE_MARKDOWN_PRETTIER: false + VALIDATE_YAML_PRETTIER: false FILTER_REGEX_EXCLUDE: '.*Set-PSModuleTest\.ps1$' diff --git a/.github/workflows/Auto-Release.yml b/.github/workflows/Release.yml similarity index 52% rename from .github/workflows/Auto-Release.yml rename to .github/workflows/Release.yml index bbe9c34..15ea61e 100644 --- a/.github/workflows/Auto-Release.yml +++ b/.github/workflows/Release.yml @@ -1,9 +1,9 @@ -name: Auto-Release +name: Release -run-name: "Auto-Release - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}" +run-name: "Release - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}" on: - pull_request_target: + pull_request: branches: - main types: @@ -12,6 +12,9 @@ on: - reopened - synchronize - labeled + paths: + - 'action.yml' + - 'src/**' concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -22,15 +25,15 @@ permissions: pull-requests: write jobs: - Auto-Release: + Release: runs-on: ubuntu-latest steps: - name: Checkout Code - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false - - name: Auto-Release - uses: PSModule/Auto-Release@v1 + - name: Release + uses: PSModule/Release-GHRepository@88c70461c8f16cc09682005bcf3b7fca4dd8dc1a # v2.0.1 with: IncrementalPrerelease: false diff --git a/README.md b/README.md index d109b4a..37dfb24 100644 --- a/README.md +++ b/README.md @@ -136,7 +136,7 @@ The action provides the following outputs: To be clear; the action follows the settings file to determine which rules to skip. 4. **View the Results** - The action outputs the results of the tests to goth logs and step summary. If the tests pass, the actions `outcome` will be `success`. + The action outputs the results of the tests to both logs and step summary. If the tests pass, the actions `outcome` will be `success`. If the tests fail, the actions outcome will be `failure`. To make the workflow continue even if the tests fail, you can set the `continue-on-error` option to `true`. Use this built-in feature to stop the workflow from failing so that you can aggregate the status of tests across multiple jobs. diff --git a/action.yml b/action.yml index 79c9988..8fb49df 100644 --- a/action.yml +++ b/action.yml @@ -248,7 +248,7 @@ runs: using: composite steps: - name: Get-TestPaths - uses: PSModule/Github-Script@v1 + uses: PSModule/GitHub-Script@0097f3bbe3f413f3b577b9bcc600727b0ca3201a # v1.7.10 id: paths env: PSMODULE_INVOKE_SCRIPTANALYZER_INPUT_Path: ${{ inputs.Path }} @@ -259,10 +259,10 @@ runs: Verbose: ${{ inputs.Verbose }} Version: ${{ inputs.Version }} WorkingDirectory: ${{ inputs.WorkingDirectory }} - Script: ${{ github.action_path }}/scripts/main.ps1 + Script: ${{ github.action_path }}/src/main.ps1 - name: Invoke-Pester - uses: PSModule/Invoke-Pester@v4 + uses: PSModule/Invoke-Pester@882994cbe1ff07c3fc8afdac52404c940f99b331 # v4.2.2 id: test env: SettingsFilePath: ${{ fromJson(steps.paths.outputs.result).SettingsFilePath }} @@ -273,7 +273,7 @@ runs: Version: ${{ inputs.Version }} WorkingDirectory: ${{ inputs.WorkingDirectory }} TestResult_TestSuiteName: ${{ inputs.TestResult_TestSuiteName }} - Path: ${{ github.action_path }}/scripts/tests/PSScriptAnalyzer + Path: ${{ github.action_path }}/src/tests/PSScriptAnalyzer Run_Path: ${{ fromJson(steps.paths.outputs.result).CodePath }} ReportAsJson: ${{ inputs.ReportAsJson }} Notice_Mode: ${{ inputs.Notice_Mode }} diff --git a/scripts/main.ps1 b/src/main.ps1 similarity index 100% rename from scripts/main.ps1 rename to src/main.ps1 diff --git a/scripts/tests/PSScriptAnalyzer/PSScriptAnalyzer.Configuration.ps1 b/src/tests/PSScriptAnalyzer/PSScriptAnalyzer.Configuration.ps1 similarity index 100% rename from scripts/tests/PSScriptAnalyzer/PSScriptAnalyzer.Configuration.ps1 rename to src/tests/PSScriptAnalyzer/PSScriptAnalyzer.Configuration.ps1 diff --git a/scripts/tests/PSScriptAnalyzer/PSScriptAnalyzer.Container.ps1 b/src/tests/PSScriptAnalyzer/PSScriptAnalyzer.Container.ps1 similarity index 100% rename from scripts/tests/PSScriptAnalyzer/PSScriptAnalyzer.Container.ps1 rename to src/tests/PSScriptAnalyzer/PSScriptAnalyzer.Container.ps1 diff --git a/scripts/tests/PSScriptAnalyzer/PSScriptAnalyzer.Tests.ps1 b/src/tests/PSScriptAnalyzer/PSScriptAnalyzer.Tests.ps1 similarity index 100% rename from scripts/tests/PSScriptAnalyzer/PSScriptAnalyzer.Tests.ps1 rename to src/tests/PSScriptAnalyzer/PSScriptAnalyzer.Tests.ps1