Skip to content

Commit c2e4ea9

Browse files
committed
add codeowners file
1 parent 95e33aa commit c2e4ea9

File tree

5 files changed

+35
-3
lines changed

5 files changed

+35
-3
lines changed

.github/CODEOWNERS

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
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

.github/workflows/gitsecrets.yml

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: GitSecretsScan
22

33
on: [push, pull_request]
44

5+
permissions: read-all
56
jobs:
67
git-secret-check:
78
name: Git Secrets Scan

.github/workflows/linux.yml

+10-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: Linux
22

33
on: [pull_request]
44

5+
permissions: read-all
56
jobs:
67
unit-tests:
78
name: Linux unit tests
@@ -13,7 +14,15 @@ jobs:
1314
- name: get GO_VERSION
1415
run: |
1516
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+\.){2}(\*|\d+)$"
21+
if ! [[ $go_version =~ $go_version_re ]] ; then
22+
echo "invalid PR number"
23+
exit 1
24+
fi
25+
echo "::set-output name=GO_VERSION::$go_version"
1726
- uses: actions/setup-go@v2
1827
with:
1928
go-version: ${{ env.GO_VERSION }}

.github/workflows/static.yml

+10-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: Static Checks
22

33
on: [push, pull_request]
44

5+
permissions: read-all
56
jobs:
67
static-check:
78
name: Static Analysis
@@ -13,7 +14,15 @@ jobs:
1314
- name: get GO_VERSION
1415
run: |
1516
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+\.){2}(\*|\d+)$"
21+
if ! [[ $go_version =~ $go_version_re ]] ; then
22+
echo "invalid PR number"
23+
exit 1
24+
fi
25+
echo "::set-output name=GO_VERSION::$go_version"
1726
- uses: actions/setup-go@v2
1827
with:
1928
go-version: ${{ env.GO_VERSION }}

.github/workflows/windows.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: Windows
22

33
on: [pull_request]
44

5+
permissions: read-all
56
jobs:
67
windows-unit-tests:
78
name: Windows unit tests
@@ -14,7 +15,13 @@ jobs:
1415
run: |
1516
cd "$Env:GITHUB_WORKSPACE"
1617
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+\.){2}(\*|\d+)$"
20+
if ($go_version_win -match $go_version_re) {
21+
echo "invalid PR number"
22+
exit 1
23+
}
24+
Write-Output "::set-output name=GO_VERSION_WINDOWS::$go_version_win"
1825
- uses: actions/setup-go@v2
1926
with:
2027
go-version: ${{ env.GO_VERSION_WINDOWS }}

0 commit comments

Comments
 (0)