diff --git a/.github/workflows/test-all-patches-action.yml b/.github/workflows/test-all-patches-action.yml new file mode 100644 index 0000000..1325855 --- /dev/null +++ b/.github/workflows/test-all-patches-action.yml @@ -0,0 +1,29 @@ +name: Test all Patches +run-name: Test all Patches for ${{ github.event.repository.updated_at }} +on: + push: + gollum: # on wiki edit +jobs: + Start Action: + runs-on: ubuntu-latest + steps: + - run: echo "This was automatically triggered by a ${{ github.event_name }} event." + + - name: Check out main + uses: actions/checkout@v4 + with: + path: src-dir + + - name: Check out Wiki + uses: actions/checkout@v4 + with: + repository: ${{ github.repository }}.wiki + path: wiki-dir + + - name: List files in the repository + run: | + ls ${{ github.workspace }} + ls + + - name: Run Tests + run: ./testPatches.sh ./src-dir ./wiki-dir diff --git a/.github/workflows/testPatches.sh b/.github/workflows/testPatches.sh index e1b3e79..87890ec 100755 --- a/.github/workflows/testPatches.sh +++ b/.github/workflows/testPatches.sh @@ -4,11 +4,11 @@ update_line() { local line="$1" # line from opened file is passed in local testResult="$2" # result from git diff - echo "Processing line: $line with additional argument: $additional_argument" + echo "Processing line: $line with additional argument: $testResult" } -wikiDirectory=./dwl.wiki -dwlSrcDirectory=./dwl +dwlSrcDirectory="$1" +wikiDirectory="$2" patchRE="https://github\.com/[^/]+/[^/]+/compare/[^/]+\.patch" for file in "$wikiDirectory"/*.md; do