From e5732ea7948f6c1592b21ab412474c27850f6911 Mon Sep 17 00:00:00 2001 From: Zach Trocinski Date: Mon, 1 Apr 2024 13:52:48 -0500 Subject: [PATCH] Update workflows with latest action versions --- .github/workflows/code-review.yml | 105 +++++++++++----------- .github/workflows/hugo-build-pr-check.yml | 9 +- .github/workflows/hugo-site-build.yml | 11 ++- 3 files changed, 63 insertions(+), 62 deletions(-) diff --git a/.github/workflows/code-review.yml b/.github/workflows/code-review.yml index 67e0bc36f..1eef2ab5d 100644 --- a/.github/workflows/code-review.yml +++ b/.github/workflows/code-review.yml @@ -1,54 +1,53 @@ --- - name: Code Review - Linting & Link Checks - - on: - pull_request: - branches: - - main - workflow_dispatch: {} - - jobs: - lint: - name: Lint code base - runs-on: ubuntu-latest - - steps: - - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Run github/super-linter - uses: github/super-linter@v5 - env: - VALIDATE_ALL_CODEBASE: false - # Need to define main branch as default is set to master in super-linter - DEFAULT_BRANCH: main - # Enable setting the status of each individual linter run in the Checks section of a pull request - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # The following linter types will be enabled: - VALIDATE_JSON: true - VALIDATE_MARKDOWN: true - VALIDATE_POWERSHELL: true - VALIDATE_YAML: true - VALIDATE_BASH: true - VALIDATE_EDITORCONFIG: true - FILTER_REGEX_EXCLUDE: ".*docs/themes/hugo-geekdoc/.*" - - markdown-link-check: - name: Markdown Link Check - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@master - with: - fetch-depth: 0 - - - name: Check links in markdown files - uses: gaurav-nelson/github-action-markdown-link-check@1.0.15 - with: - config-file: ".github/linters/mlc_config.json" - use-verbose-mode: "yes" - use-quiet-mode: "yes" +name: Code Review - Linting & Link Checks + +on: + pull_request: + branches: + - main + workflow_dispatch: {} + +jobs: + lint: + name: Lint code base + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Run github/super-linter + uses: github/super-linter@v5 + env: + VALIDATE_ALL_CODEBASE: false + # Need to define main branch as default is set to master in super-linter + DEFAULT_BRANCH: main + # Enable setting the status of each individual linter run in the Checks section of a pull request + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # The following linter types will be enabled: + VALIDATE_JSON: true + VALIDATE_MARKDOWN: true + VALIDATE_POWERSHELL: true + VALIDATE_YAML: true + VALIDATE_BASH: true + VALIDATE_EDITORCONFIG: true + FILTER_REGEX_EXCLUDE: ".*docs/themes/hugo-geekdoc/.*" + + markdown-link-check: + name: Markdown Link Check + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@main + with: + fetch-depth: 0 + + - name: Check links in markdown files + uses: gaurav-nelson/github-action-markdown-link-check@1.0.15 + with: + config-file: ".github/linters/mlc_config.json" + use-verbose-mode: "yes" + use-quiet-mode: "yes" diff --git a/.github/workflows/hugo-build-pr-check.yml b/.github/workflows/hugo-build-pr-check.yml index 961a50f8f..eb8b0a586 100644 --- a/.github/workflows/hugo-build-pr-check.yml +++ b/.github/workflows/hugo-build-pr-check.yml @@ -6,8 +6,11 @@ on: branches: - main paths: - - 'docs/**' - - '.github/workflows/hugo-build-pr-check.yml' + - "docs/**" + - "azure-resources/**" + - "azure-specialized-workloads/**" + - "azure-waf/**" + - ".github/workflows/hugo-build-pr-check.yml" workflow_dispatch: {} # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages @@ -44,7 +47,7 @@ jobs: - name: Setup Pages id: pages - uses: actions/configure-pages@v4 + uses: actions/configure-pages@v5 - name: Install Node.js dependencies run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true" diff --git a/.github/workflows/hugo-site-build.yml b/.github/workflows/hugo-site-build.yml index a0551e5d6..32ef1446b 100644 --- a/.github/workflows/hugo-site-build.yml +++ b/.github/workflows/hugo-site-build.yml @@ -7,9 +7,9 @@ on: branches: - main paths: - - 'docs/**' - - 'azure-resources/**/recommendations.yaml' - - 'azure-resources/**/*.md' + - "docs/**" + - "azure-resources/**/recommendations.yaml" + - "azure-resources/**/*.md" # Allows you to run this workflow manually from the Actions tab workflow_dispatch: {} @@ -54,11 +54,11 @@ jobs: - name: Setup Python uses: actions/setup-python@v5 with: - python-version: '3.11' # install the python version needed + python-version: "3.11" # install the python version needed - name: Setup Pages id: pages - uses: actions/configure-pages@v4 + uses: actions/configure-pages@v5 - name: Install Node.js dependencies run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true" @@ -80,7 +80,6 @@ jobs: with: path: ./public - # Deployment job deploy: environment: