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..2ba587b5e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,24 +1,40 @@ 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: get-ref + uses: docker://mikefarah/yq:4.44.1-githubaction + with: + args: |- + yq '[.jobs.*.uses | select(tag == "!!str" and test("^${{ env.HERE }}@"))][0] | sub("^${{ env.HERE }}@", "")' ${{ github.workflow }} + + - id: test-ref + run: | + echo "result=v1.3.0" >> "$GITHUB_OUTPUT" + + + - uses: 4m-mazi/souji-action@${{ steps.get-ref.outputs.result }} + - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 + with: + repository: 4m-mazi/gh-test + ref: ${{ steps.get-ref.outputs.result }} + path: 'souji-action'