gnodet commented on code in PR #13083:
URL: https://github.com/apache/maven/pull/13083#discussion_r3970374328


##########
.github/workflows/actionlint.yml:
##########
@@ -0,0 +1,56 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Lints the GitHub Actions workflows themselves with actionlint
+# (https://github.com/rhysd/actionlint): workflow syntax, expression
+# contexts, and embedded shell (via shellcheck). Only runs when a workflow
+# file changes.
+name: Actionlint
+
+on:
+  push:
+    paths:
+      - '.github/workflows/**'
+  pull_request:
+    paths:
+      - '.github/workflows/**'
+
+# cancel superseded runs on the same ref (e.g. rapid pushes to a branch)
+concurrency:
+  group: ${{ github.workflow }}-${{ github.ref }}
+  cancel-in-progress: true
+
+# clear all permissions for GITHUB_TOKEN
+permissions: {}
+
+jobs:
+  actionlint:
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout maven
+        uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # 
v7.0.1
+        with:
+          persist-credentials: false
+
+      # Runs actionlint over .github/workflows/** (auto-discovered).
+      # NOTE (for review): pinned to a version tag here for readability; if we
+      # adopt this, pin to the image digest to match how the other workflows
+      # pin their actions by SHA.
+      - name: Run actionlint
+        uses: docker://rhysd/actionlint:1.7.12
+        with:

Review Comment:
   Per project convention, this should be pinned by image digest rather than 
version tag:
   ```suggestion
           uses: docker://rhysd/actionlint@sha256:<digest>
   ```
   You can find the digest with:
   ```
   docker pull rhysd/actionlint:1.7.12
   docker inspect --format='{{index .RepoDigests 0}}' rhysd/actionlint:1.7.12
   ```
   The code comment at line 52-54 already flags this — just leaving a concrete 
suggestion for the final version.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to