From f634e9c89678308854c8deb57803115a12a65d16 Mon Sep 17 00:00:00 2001 From: Nicolas Rey Date: Fri, 18 Oct 2024 10:49:32 -0300 Subject: [PATCH] ci: use the build args from the dotenv file --- .github/workflows/test-tools.yml | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test-tools.yml b/.github/workflows/test-tools.yml index a097e28..76ef75e 100644 --- a/.github/workflows/test-tools.yml +++ b/.github/workflows/test-tools.yml @@ -32,15 +32,9 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Load .env file and set build-args - id: load-env - run: | - build_args="" - while read -r line; do - key=$(echo "$line" | cut -d '=' -f 1) - value=$(echo "$line" | cut -d '=' -f 2) - echo "$key=$value" >> build-args.txt - done < .env + - name: Load .env file + id: dotenv + uses: xom9ikk/dotenv@v2 - name: Build container uses: docker/build-push-action@v6 @@ -50,8 +44,7 @@ jobs: cache-from: type=gha cache-to: type=gha,mode=max tags: theredguild/container-sec-tools:latest - build-args: | - $(cat build-args.txt) + build-args: ${{ steps.dotenv.outputs.vars }} - name: Check disk space run: df -h