浏览代码

Implement a workflow to check other workflows syntax (#1645)

* add workflow linter workflow

* fix linter errors

* change step name to clear one

* rename job
Ruslan Ibragimov 3 年之前
父节点
当前提交
b8761b500d

+ 1 - 1
.github/workflows/aws_publisher.yaml

@@ -48,4 +48,4 @@ jobs:
           arguments: "-color=false -on-error=abort -var=kafka_ui_release_version=${{ github.event.inputs.KafkaUIReleaseVersion }}"
           arguments: "-color=false -on-error=abort -var=kafka_ui_release_version=${{ github.event.inputs.KafkaUIReleaseVersion }}"
           target: kafka-ui-infra/ami/kafka-ui.pkr.hcl
           target: kafka-ui-infra/ami/kafka-ui.pkr.hcl
         env:
         env:
-          PACKER_LOG: 1
+          PACKER_LOG: 1

+ 1 - 1
.github/workflows/helm.yaml

@@ -26,7 +26,7 @@ jobs:
           echo "NEXT K8S VERSIONS ARE GOING TO BE TESTED: $K8S_VERSIONS"
           echo "NEXT K8S VERSIONS ARE GOING TO BE TESTED: $K8S_VERSIONS"
           echo ""
           echo ""
           for version in $K8S_VERSIONS
           for version in $K8S_VERSIONS
-            do 
+            do
               echo $version;
               echo $version;
               helm template charts/kafka-ui -f charts/kafka-ui/values.yaml | kubeval --additional-schema-locations https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master --strict -v $version;
               helm template charts/kafka-ui -f charts/kafka-ui/values.yaml | kubeval --additional-schema-locations https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master --strict -v $version;
             done
             done

+ 1 - 1
.github/workflows/release_drafter.yml

@@ -16,4 +16,4 @@ jobs:
           config-name: release_drafter.yaml
           config-name: release_drafter.yaml
           disable-autolabeler: true
           disable-autolabeler: true
         env:
         env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

+ 1 - 1
.github/workflows/welcome-first-time-contributors.yml

@@ -21,7 +21,7 @@ jobs:
             Thank you and congratulations 🎉 for opening your very first issue in this project! 💖
             Thank you and congratulations 🎉 for opening your very first issue in this project! 💖
 
 
             In case you want to claim this issue, please comment down below! We will try to get back to you as soon as we can. 👀
             In case you want to claim this issue, please comment down below! We will try to get back to you as soon as we can. 👀
-            
+
           pr-message: |
           pr-message: |
             Hello there ${{ github.actor }}! 👋
             Hello there ${{ github.actor }}! 👋
 
 

+ 22 - 0
.github/workflows/workflow_linter.yaml

@@ -0,0 +1,22 @@
+name: "Workflow linter"
+on:
+  pull_request:
+    types:
+      - "opened"
+      - "reopened"
+      - "synchronize"
+      - "edited"
+    paths:
+      - ".github/workflows/**"
+jobs:
+  build-and-test:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          fetch-depth: 0
+          ref: ${{ github.event.pull_request.head.sha }}
+      - name: Install yamllint
+        run: sudo apt install -y yamllint
+      - name: Validate workflow yaml files
+        run: yamllint .github/workflows/. -d relaxed -f github --no-warnings