diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 44079c0..346e5ea 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -1,11 +1,14 @@ name: Build -on: [push] +on: + workflow_run: + workflows: ["Tests"] + types: + - completed jobs: execute-tests: runs-on: ubuntu-latest steps: - name: Set running - if: always() run: | curl -v -X POST https://barrelsofdata.com/api/v1/git/action/status/publish \ -H 'X-API-KEY: ${{ secrets.STATUS_PUBLISH_API_KEY }}' \ @@ -20,7 +23,7 @@ jobs: distribution: 'temurin' - name: Build id: build - run: ./gradlew bootJar -x test + run: ./gradlew build -x test - name: Publish status if: always() run: | diff --git a/.gitea/workflows/init.yaml b/.gitea/workflows/init.yaml new file mode 100644 index 0000000..83b5d9a --- /dev/null +++ b/.gitea/workflows/init.yaml @@ -0,0 +1,18 @@ +name: Init +on: [push] +jobs: + execute-tests: + runs-on: ubuntu-latest + steps: + - name: Reset test status + run: | + curl -v -X POST https://barrelsofdata.com/api/v1/git/action/status/publish \ + -H 'X-API-KEY: ${{ secrets.STATUS_PUBLISH_API_KEY }}' \ + -H 'Content-Type: application/json' \ + -d '{"action":"${{ gitea.repository }}/action/Tests","status":"starting"}' + - name: Reset build status + run: | + curl -v -X POST https://barrelsofdata.com/api/v1/git/action/status/publish \ + -H 'X-API-KEY: ${{ secrets.STATUS_PUBLISH_API_KEY }}' \ + -H 'Content-Type: application/json' \ + -d '{"action":"${{ gitea.repository }}/action/Build","status":"waiting for test"}' \ No newline at end of file diff --git a/.gitea/workflows/tests.yaml b/.gitea/workflows/tests.yaml index d8e7e55..cfb5f37 100644 --- a/.gitea/workflows/tests.yaml +++ b/.gitea/workflows/tests.yaml @@ -1,11 +1,14 @@ name: Tests -on: [push, pull_request] +on: + workflow_run: + workflows: ["Init"] + types: + - completed jobs: execute-tests: runs-on: ubuntu-latest steps: - name: Set running - if: always() run: | curl -v -X POST https://barrelsofdata.com/api/v1/git/action/status/publish \ -H 'X-API-KEY: ${{ secrets.STATUS_PUBLISH_API_KEY }}' \