diff --git a/.github/workflows/call-test.yml b/.github/workflows/call-test.yml index b6cd1b0b3..f632b1ba8 100644 --- a/.github/workflows/call-test.yml +++ b/.github/workflows/call-test.yml @@ -4,4 +4,4 @@ on: jobs: call: - uses: 4m-mazi/gh-test/.github/workflows/debug.yml@4cf8a995b52ae9b78a8b9694d473e8a3453281de + uses: 4m-mazi/gh-test/.github/workflows/test.yml@main diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a9df88dff..8d277863b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,24 +1,41 @@ name: test on: - push: - branches: ["**"] - workflow_dispatch: - inputs: # null for another event - skip: - type: boolean - default: false + workflow_call: permissions: {} +env: + HERE: "4m-mazi/gh-test/.github/workflows/test.yml" + jobs: test1: + permissions: + contents: read if: > true runs-on: ubuntu-latest steps: + - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 + with: + sparse-checkout: | + ${{ github.workflow }} + sparse-checkout-cone-mode: false - run: | - test2: - if: >- - true - runs-on: ubuntu-latest - steps: - - run: '' + ls -lah + - id: escape + run: | + cat << 'EOF' | sed -e 's/"/\\"/' -e 's/^/result=/' >> "$GITHUB_OUTPUT" + yq '[.jobs.*.uses | select(tag == "!!str" and test("^${{ env.HERE }}@"))][0] | sub("^${{ env.HERE }}@", "")' ${{ github.workflow }} + EOF + + - id: get-ref + uses: docker://mikefarah/yq:4.43.1-githubaction + with: + args: ${{ steps.escape.outputs.result }} + + + - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 + with: + repository: 4m-mazi/gh-test + ref: ${{ steps.get-ref.outputs.result }} + path: 'souji-action' + - uses: ./souji-action/