Просмотр исходного кода

ci: download actionlint from github releases

Ivan Dyachkov 2 лет назад
Родитель
Сommit
8232d8bc8b
2 измененных файлов с 6 добавлено и 2 удалено
  1. 4 1
      .github/actions/pr-sanity-checks/action.yaml
  2. 2 1
      scripts/pr-sanity-checks.sh

+ 4 - 1
.github/actions/pr-sanity-checks/action.yaml

@@ -23,8 +23,11 @@ runs:
       # https://github.com/rhysd/actionlint/blob/main/docs/usage.md#use-actionlint-on-github-actions
       # https://github.com/rhysd/actionlint/blob/main/docs/usage.md#use-actionlint-on-github-actions
     - name: Check workflow files
     - name: Check workflow files
       shell: bash
       shell: bash
+      env:
+        ACTIONLINT_VSN: 1.6.25
       run: |
       run: |
-        bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
+        wget https://github.com/rhysd/actionlint/releases/download/v${ACTIONLINT_VSN}/actionlint_${ACTIONLINT_VSN}_linux_amd64.tar.gz
+        tar xfz actionlint_${ACTIONLINT_VSN}_linux_amd64.tar.gz
         # TODO: enable shellcheck when all the current issues are fixed
         # TODO: enable shellcheck when all the current issues are fixed
         ./actionlint -color \
         ./actionlint -color \
           -shellcheck= \
           -shellcheck= \

+ 2 - 1
scripts/pr-sanity-checks.sh

@@ -29,4 +29,5 @@ docker run --rm -it -v "$(pwd):/emqx" -w /emqx \
        -e GITHUB_BASE_REF="$BEFORE_REF" \
        -e GITHUB_BASE_REF="$BEFORE_REF" \
        -e MIX_ENV=emqx-enterprise \
        -e MIX_ENV=emqx-enterprise \
        -e PROFILE=emqx-enterprise \
        -e PROFILE=emqx-enterprise \
-       "${EMQX_BUILDER}" /bin/bash -c "${commands}"
+       -e ACTIONLINT_VSN=1.6.25 \
+       "${EMQX_BUILDER}" /bin/bash -c "git config --global --add safe.directory /emqx; ${commands}"