File tree 1 file changed +43
-0
lines changed
1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Copyright 2023 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ name : ' lint'
16
+
17
+ on :
18
+ pull_request :
19
+ branches :
20
+ - master
21
+
22
+ concurrency :
23
+ group : ' ${{ github.workflow }}-${{ github.head_ref || github.ref }}'
24
+ cancel-in-progress : true
25
+
26
+ jobs :
27
+ lint :
28
+ name : ' lint'
29
+ runs-on : ' ubuntu-latest'
30
+ steps :
31
+ - uses : ' actions/checkout@v3'
32
+ - id : variables
33
+ run : |
34
+ MAKEFILE=$(find . -name Makefile -print -quit)
35
+ if [ ! -f $MAKEFILE ]; then
36
+ echo dev-tools=gcr.io/cloud-foundation-cicd/cft/developer-tools:1 >> "$GITHUB_OUTPUT"
37
+ else
38
+ VERSION=$(grep "DOCKER_TAG_VERSION_DEVELOPER_TOOLS := " $MAKEFILE | cut -d\ -f3)
39
+ IMAGE=$(grep "DOCKER_IMAGE_DEVELOPER_TOOLS := " $MAKEFILE | cut -d\ -f3)
40
+ REGISTRY=$(grep "REGISTRY_URL := " $MAKEFILE | cut -d\ -f3)
41
+ echo dev-tools=${REGISTRY}/${IMAGE}:${VERSION} >> "$GITHUB_OUTPUT"
42
+ fi
43
+ - run : docker run --rm -e EXCLUDE_LINT_DIRS -v ${{ github.workspace }}:/workspace ${{ steps.variables.outputs.dev-tools }} /usr/local/bin/test_lint.sh
You can’t perform that action at this time.
0 commit comments