diff --git a/.github/workflows/run.yml b/.github/workflows/run.yml new file mode 100644 index 0000000..d0bd80f --- /dev/null +++ b/.github/workflows/run.yml @@ -0,0 +1,26 @@ +on: + workflow_call: + inputs: + earthfiles: + description: | + A JSON list of Earthfile paths+targets to run + required: true + type: string + +jobs: + run: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + earthfile: ${{ fromJson(inputs.earthfiles) }} + steps: + - uses: actions/checkout@v4 + - name: Setup CI + uses: ./forge/actions/setup + with: + forge_version: local + - name: Run + uses: ./forge/actions/run + with: + path: ${{ matrix.earthfile }} \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 44a67b5..bc5bb43 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,8 +7,10 @@ permissions: id-token: write jobs: - test: + discover: runs-on: ubuntu-latest + outputs: + result: ${{ steps.discovery.outputs.result }} steps: - uses: actions/checkout@v4 - name: Setup @@ -22,7 +24,8 @@ jobs: filters: | ^check.* ^test.* - - name: Run - uses: ./forge/actions/run - with: - path: ./forge/cli+test \ No newline at end of file + check: + uses: ./.github/workflows/run.yml + needs: [discover] + with: + earthfiles: ${{ fromJson(needs.discover.outputs.result)["^check.*"] }}