From 26522aafa375dc613023f43f4028cefe41e7191e Mon Sep 17 00:00:00 2001 From: Muhammad Fahreza Alghifari Date: Wed, 9 Oct 2024 11:40:10 +0800 Subject: [PATCH 1/2] allow workflow runs from external contributors --- .github/workflows/run-workflow-tests.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run-workflow-tests.yml b/.github/workflows/run-workflow-tests.yml index 720778f..b075247 100644 --- a/.github/workflows/run-workflow-tests.yml +++ b/.github/workflows/run-workflow-tests.yml @@ -1,6 +1,10 @@ name: Run Xircuits Workflows Test on: + push: + branches: [ main ] + pull_request: + branches: "*" workflow_dispatch: jobs: @@ -33,7 +37,14 @@ jobs: run: xircuits list - name: Clone Repository - run: git clone -b ${{ env.BRANCH_NAME }} https://github.com/${{ github.repository }} ${{ env.COMPONENT_LIBRARY_PATH }} + run: | + rm -rf ${{ env.COMPONENT_LIBRARY_PATH }} + if [ "${{ github.event_name }}" == "pull_request" ]; then + REPO_URL="${{ github.event.pull_request.head.repo.clone_url }}" + else + REPO_URL="https://github.com/${{ github.repository }}" + fi + git clone -b ${{ env.BRANCH_NAME }} $REPO_URL ${{ env.COMPONENT_LIBRARY_PATH }} - name: Install Component Library run: | From ac1cf88e56ef9c72b69036169751f231f5eb8467 Mon Sep 17 00:00:00 2001 From: Muhammad Fahreza Alghifari Date: Wed, 9 Oct 2024 11:45:35 +0800 Subject: [PATCH 2/2] bump artifact version --- .github/workflows/run-workflow-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-workflow-tests.yml b/.github/workflows/run-workflow-tests.yml index b075247..82aea0a 100644 --- a/.github/workflows/run-workflow-tests.yml +++ b/.github/workflows/run-workflow-tests.yml @@ -98,7 +98,7 @@ jobs: - name: Upload log file if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ env.LIBRARY_NAME }}-validation-workflow path: ${{ github.workspace }}/workflow_logs.txt