From 5b226525b332718d26fabcfbd1830cdc32336398 Mon Sep 17 00:00:00 2001 From: Tingluo Huang Date: Wed, 20 Apr 2022 21:37:43 -0400 Subject: Add set-safe-directory input to allow customers to take control. (#770) * Add set-safe-directory input to allow customers to take control. --- .github/workflows/test.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to '.github') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2fc85eb..0e77c57 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -205,3 +205,41 @@ jobs: path: basic - name: Verify basic run: __test__/verify-basic.sh --archive + + test-git-container: + runs-on: ubuntu-latest + container: bitnami/git:latest + steps: + # Clone this repo + - name: Checkout + uses: actions/checkout@v3 + with: + path: v3 + + # Basic checkout using git + - name: Checkout basic + uses: ./v3 + with: + ref: test-data/v2/basic + - name: Verify basic + run: | + if [ ! -f "./basic-file.txt" ]; then + echo "Expected basic file does not exist" + exit 1 + fi + + # Verify .git folder + if [ ! -d "./.git" ]; then + echo "Expected ./.git folder to exist" + exit 1 + fi + + # Verify auth token + git config --global --add safe.directory "*" + git fetch --no-tags --depth=1 origin +refs/heads/main:refs/remotes/origin/main + + # needed to make checkout post cleanup succeed + - name: Fix Checkout v3 + uses: actions/checkout@v3 + with: + path: v3 \ No newline at end of file -- cgit v1.2.3