diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 53188fef..0da2fac8 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 3bbc16c5..00000000 --- a/.github/linters/.jscpd.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "threshold": 0, - "reporters": [ - "consoleFull" - ], - "ignore": [ - "**/tests/**", - "**/.github/workflows/Action-Test**" - ], - "absolute": true -} diff --git a/.github/release.yml b/.github/release.yml deleted file mode 100644 index 35c6ae86..00000000 --- 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 479b90d3..12bd6a8d 100644 --- a/.github/workflows/Action-Test.yml +++ b/.github/workflows/Action-Test.yml @@ -29,7 +29,9 @@ jobs: steps: # Need to check out as part of the test, as its a local action - name: Checkout repo - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false - name: Action-Test [1-Simple] uses: ./ @@ -57,7 +59,9 @@ jobs: steps: # Need to check out as part of the test, as its a local action - name: Checkout repo - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false - name: Action-Test [1-Simple-File] uses: ./ @@ -85,7 +89,9 @@ jobs: steps: # Need to check out as part of the test, as its a local action - name: Checkout repo - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false - name: Action-Test [1-Simple-Failure] uses: ./ @@ -114,7 +120,9 @@ jobs: steps: # Need to check out as part of the test, as its a local action - name: Checkout repo - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false - name: Action-Test [1-Simple-Failure] uses: ./ @@ -143,7 +151,9 @@ jobs: steps: # Need to check out as part of the test, as its a local action - name: Checkout repo - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false - name: Action-Test [1-Simple-ExecutionFailure] uses: ./ @@ -170,7 +180,9 @@ jobs: steps: # Need to check out as part of the test, as its a local action - name: Checkout repo - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false - name: Action-Test [2-Standard] uses: ./ @@ -200,7 +212,9 @@ jobs: steps: # Need to check out as part of the test, as its a local action - name: Checkout repo - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false - name: Action-Test [2-Standard-NoSummary] uses: ./ @@ -228,7 +242,9 @@ jobs: steps: # Need to check out as part of the test, as its a local action - name: Checkout repo - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false - name: Action-Test [3-Advanced] uses: ./ @@ -259,7 +275,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Display Aggregated Results as a Table - uses: PSModule/Github-Script@v1 + uses: PSModule/GitHub-Script@0097f3bbe3f413f3b577b9bcc600727b0ca3201a # v1.7.10 with: Script: | 'Markdown' | ForEach-Object { diff --git a/.github/workflows/Auto-Release.yml b/.github/workflows/Auto-Release.yml deleted file mode 100644 index b0835525..00000000 --- a/.github/workflows/Auto-Release.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Auto-Release - -run-name: "Auto-Release - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}" - -on: - pull_request_target: - branches: - - main - types: - - closed - - opened - - reopened - - synchronize - - labeled - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -permissions: - contents: write # Required to create releases - pull-requests: write # Required to create comments on the PRs - -jobs: - Auto-Release: - runs-on: ubuntu-latest - steps: - - name: Checkout Code - uses: actions/checkout@v6 - - - name: Auto-Release - uses: PSModule/Auto-Release@v1 diff --git a/.github/workflows/Linter.yml b/.github/workflows/Linter.yml index 19626293..3a07190e 100644 --- a/.github/workflows/Linter.yml +++ b/.github/workflows/Linter.yml @@ -19,14 +19,17 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repo - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 + persist-credentials: false - 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_BIOME_FORMAT: false + VALIDATE_JSCPD: false VALIDATE_JSON_PRETTIER: false VALIDATE_MARKDOWN_PRETTIER: false VALIDATE_YAML_PRETTIER: false diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml new file mode 100644 index 00000000..9d2a6319 --- /dev/null +++ b/.github/workflows/Release.yml @@ -0,0 +1,37 @@ +name: Release + +run-name: "Release - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}" + +on: + pull_request: + branches: + - main + types: + - closed + - opened + - reopened + - synchronize + - labeled + paths: + - 'action.yml' + - 'src/**' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: write # Required to create releases + pull-requests: write # Required to create comments on the PRs + +jobs: + Release: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + + - name: Release + uses: PSModule/Release-GHRepository@88c70461c8f16cc09682005bcf3b7fca4dd8dc1a # v2.0.1 diff --git a/action.yml b/action.yml index 51098750..4ab5bb51 100644 --- a/action.yml +++ b/action.yml @@ -285,7 +285,7 @@ runs: using: composite steps: - name: Invoke-Pester (init) - uses: PSModule/GitHub-Script@v1 + uses: PSModule/GitHub-Script@0097f3bbe3f413f3b577b9bcc600727b0ca3201a # v1.7.10 env: PSMODULE_INVOKE_PESTER_INPUT_Path: ${{ inputs.Path }} PSMODULE_INVOKE_PESTER_INPUT_Run_Path: ${{ inputs.Run_Path }} @@ -341,7 +341,7 @@ runs: Name: Invoke-Pester Script: | # Invoke-Pester (init) - ${{ github.action_path }}/scripts/init.ps1 + ${{ github.action_path }}/src/init.ps1 - name: Invoke-Pester (exec) shell: pwsh @@ -359,10 +359,10 @@ runs: run: | # Invoke-Pester (exec) ${{ inputs.Prescript }} - ${{ github.action_path }}/scripts/exec.ps1 + ${{ github.action_path }}/src/exec.ps1 - name: Upload test results - [${{ steps.test.outputs.TestSuiteName }}-TestResults] - uses: actions/upload-artifact@v5 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 if: ${{ steps.test.outputs.TestResultEnabled == 'true' && (success() || failure()) }} with: name: ${{ steps.test.outputs.TestSuiteName }}-TestResults @@ -371,7 +371,7 @@ runs: if-no-files-found: error - name: Upload code coverage report - [${{ steps.test.outputs.TestSuiteName }}-CodeCoverage] - uses: actions/upload-artifact@v5 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 if: ${{ steps.test.outputs.CodeCoverageEnabled == 'true' && (success() || failure()) }} with: name: ${{ steps.test.outputs.TestSuiteName }}-CodeCoverage @@ -398,4 +398,4 @@ runs: PSMODULE_INVOKE_PESTER_INTERNAL_TotalCount: ${{ steps.test.outputs.TotalCount }} run: | # Status - ${{ github.action_path }}/scripts/status.ps1 + ${{ github.action_path }}/src/status.ps1 diff --git a/scripts/Helpers.psm1 b/src/Helpers.psm1 similarity index 100% rename from scripts/Helpers.psm1 rename to src/Helpers.psm1 diff --git a/scripts/exec.ps1 b/src/exec.ps1 similarity index 100% rename from scripts/exec.ps1 rename to src/exec.ps1 diff --git a/scripts/init.ps1 b/src/init.ps1 similarity index 100% rename from scripts/init.ps1 rename to src/init.ps1 diff --git a/scripts/status.ps1 b/src/status.ps1 similarity index 100% rename from scripts/status.ps1 rename to src/status.ps1