File tree 5 files changed +35
-3
lines changed
5 files changed +35
-3
lines changed Original file line number Diff line number Diff line change
1
+ # https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners
2
+
3
+ # These owners will be the default owners for everything in
4
+ # the repo. Unless a later match takes precedence, these accounts
5
+ # will be requested for review when someone opens a pull request.
6
+ * @ aws/aws-ecs-agent
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ name: GitSecretsScan
2
2
3
3
on : [push, pull_request]
4
4
5
+ permissions : read-all
5
6
jobs :
6
7
git-secret-check :
7
8
name : Git Secrets Scan
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ name: Linux
2
2
3
3
on : [pull_request]
4
4
5
+ permissions : read-all
5
6
jobs :
6
7
unit-tests :
7
8
name : Linux unit tests
13
14
- name : get GO_VERSION
14
15
run : |
15
16
cd $GITHUB_WORKSPACE/src/github.com/aws/amazon-ecs-agent
16
- echo "GO_VERSION=$(cat GO_VERSION)" >> $GITHUB_ENV
17
+ set -eou pipefail
18
+ go_version=$(cat -e GO_VERSION)
19
+ go_version=${go_version%?}
20
+ go_version_re="^(\d+\.)?(\d+\.)?(\*|\d+)$"
21
+ if ! [[ $go_version =~ $go_version_re ]] ; then
22
+ echo "invalid GO version"
23
+ exit 1
24
+ fi
25
+ echo "::set-output name=GO_VERSION::$go_version"
17
26
- uses : actions/setup-go@v2
18
27
with :
19
28
go-version : ${{ env.GO_VERSION }}
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ name: Static Checks
2
2
3
3
on : [push, pull_request]
4
4
5
+ permissions : read-all
5
6
jobs :
6
7
static-check :
7
8
name : Static Analysis
13
14
- name : get GO_VERSION
14
15
run : |
15
16
cd $GITHUB_WORKSPACE/src/github.com/aws/amazon-ecs-agent
16
- echo "GO_VERSION=$(cat GO_VERSION)" >> $GITHUB_ENV
17
+ set -eou pipefail
18
+ go_version=$(cat -e GO_VERSION)
19
+ go_version=${go_version%?}
20
+ go_version_re="^(\d+\.)?(\d+\.)?(\*|\d+)$"
21
+ if ! [[ $go_version =~ $go_version_re ]] ; then
22
+ echo "invalid GO version"
23
+ exit 1
24
+ fi
25
+ echo "::set-output name=GO_VERSION::$go_version"
17
26
- uses : actions/setup-go@v2
18
27
with :
19
28
go-version : ${{ env.GO_VERSION }}
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ name: Windows
2
2
3
3
on : [pull_request]
4
4
5
+ permissions : read-all
5
6
jobs :
6
7
windows-unit-tests :
7
8
name : Windows unit tests
14
15
run : |
15
16
cd "$Env:GITHUB_WORKSPACE"
16
17
cd "src/github.com/aws/amazon-ecs-agent"
17
- echo "GO_VERSION_WINDOWS=$(type GO_VERSION_WINDOWS)" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
18
+ $go_version_win = $(type GO_VERSION_WINDOWS)
19
+ $go_version_re = "^(\d+\.)?(\d+\.)?(\*|\d+)$"
20
+ if ($go_version_win -match $go_version_re) {
21
+ echo "invalid GO version"
22
+ exit 1
23
+ }
24
+ Write-Output "::set-output name=GO_VERSION_WINDOWS::$go_version_win"
18
25
- uses : actions/setup-go@v2
19
26
with :
20
27
go-version : ${{ env.GO_VERSION_WINDOWS }}
You can’t perform that action at this time.
0 commit comments