From 8ee26e53e4acfff2c18b30cf169244dc479a03b2 Mon Sep 17 00:00:00 2001 From: Ikechukwu Uchendu Date: Wed, 22 Nov 2023 10:34:19 -0500 Subject: [PATCH] Making sure to update and upgrade dist packages before trying to install github CLI --- .github/workflows/markdown_linter.yml | 45 ++++++++++++++------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/.github/workflows/markdown_linter.yml b/.github/workflows/markdown_linter.yml index fb9641c71..41fbffa39 100644 --- a/.github/workflows/markdown_linter.yml +++ b/.github/workflows/markdown_linter.yml @@ -7,29 +7,30 @@ jobs: lint-qmd-files: runs-on: ubuntu-latest steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 - - name: Installing GitHub CLI - run: | - sudo apt install -y gh jq nodejs npm + - name: Installing GitHub CLI + run: | + sudo apt -y update && sudo apt -y upgrade + sudo apt -y install software-properties-common + sudo apt install -y gh jq nodejs npm - - - name: Installing Markdown Linter - run: | - sudo npm install -g markdownlint-cli + - name: Installing Markdown Linter + run: | + sudo npm install -g markdownlint-cli - - name: Markdown linting job has been triggered - run: | - echo "The job was automatically triggered by a ${{ github.event_name }} event." + - name: Markdown linting job has been triggered + run: | + echo "The job was automatically triggered by a ${{ github.event_name }} event." - - name: Running markdown linter - run: | - markdownlint --config .github/workflows/markdown_linter/.mdlintconfig.yml --ignore-path .github/workflows/markdown_linter/.mdlintignore ./ - ret=$? - if [ $ret -eq 1 ]; then - echo "Linting failed. Please correct any errors and run the job again." - exit 1 - fi \ No newline at end of file + - name: Running markdown linter + run: | + markdownlint --config .github/workflows/markdown_linter/.mdlintconfig.yml --ignore-path .github/workflows/markdown_linter/.mdlintignore ./ + ret=$? + if [ $ret -eq 1 ]; then + echo "Linting failed. Please correct any errors and run the job again." + exit 1 + fi