From c974ce35efd5a8cd7cccb28df58b5b9a3311f81f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 29 May 2024 09:29:18 +0000 Subject: [PATCH] fix: grept apply --- .github/CODEOWNERS | 4 ++-- avm | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 72c8f8e..4ab9367 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,3 +1,3 @@ # AVM core team owns key files -.github/policies/ @Azure/avm-core-team-technical -.github/CODEOWNERS @Azure/avm-core-team-technical +.github/policies/ @Azure/avm-core-team-technical-terraform +.github/CODEOWNERS @Azure/avm-core-team-technical-terraform diff --git a/avm b/avm index 69f9ce0..6668be7 100755 --- a/avm +++ b/avm @@ -18,4 +18,10 @@ if [ -z "$1" ]; then exit 1 fi -$CONTAINER_RUNTIME run --pull always --rm -v "$(pwd)":/src -w /src -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER mcr.microsoft.com/azterraform make "$1" +# Check if we are running in a container +# If we are then just run make directly +if [ -z "$AVM_IN_CONTAINER" ]; then + $CONTAINER_RUNTIME run --pull always --user "$(id -u):$(id -g)" --rm -v /etc/passwd:/etc/passwd -v /etc/group:/etc/group -v "$(pwd)":/src -w /src -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER mcr.microsoft.com/azterraform make "$1" +else + make "$1" +fi