From a3d0cd9677712abff3a89a9bdf6d8df44d05a430 Mon Sep 17 00:00:00 2001 From: Jason Teng Date: Sat, 5 Aug 2023 01:25:16 -0700 Subject: [PATCH] Add: adjust action --- .github/workflows/build-all.yml | 23 +++++++++++++++-------- .github/workflows/pr-test.yml | 15 --------------- 2 files changed, 15 insertions(+), 23 deletions(-) delete mode 100644 .github/workflows/pr-test.yml diff --git a/.github/workflows/build-all.yml b/.github/workflows/build-all.yml index cfcbb1f..e62a70a 100644 --- a/.github/workflows/build-all.yml +++ b/.github/workflows/build-all.yml @@ -3,6 +3,12 @@ on: push: branches: - "*" + - "!main" + paths-ignore: + - '**.md' + pull_request: + branches: + - main paths-ignore: - '**.md' @@ -68,17 +74,18 @@ jobs: with: name: BINARY.bin path: ${{ github.workspace }}/build/*.bin - - pr-check: - if: ${{ always() }} + + Result: + runs-on: ubuntu-22.04 needs: - github-build - arch-build - alpine-build - ubuntu-build-upload - runs-on: ubuntu-latest steps: - - name: Decide whether the needed jobs succeeded or failed - uses: re-actors/alls-green@release/v1 - with: - jobs: ${{ toJSON(needs) }} \ No newline at end of file + - name: All tests ok + if: ${{ !(contains(needs.*.result, 'failure')) }} + run: exit 0 + - name: Some tests failed + if: ${{ contains(needs.*.result, 'failure') }} + run: exit 1 \ No newline at end of file diff --git a/.github/workflows/pr-test.yml b/.github/workflows/pr-test.yml deleted file mode 100644 index d4ef4a5..0000000 --- a/.github/workflows/pr-test.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: "PR Test" -on: - pull_request: - branches: - - main - -jobs: - pr-check: - runs-on: ubuntu-latest - container: - image: "ghcr.io/jasonyang-ee/stm32-builder:ubuntu-latest" - steps: - - uses: actions/checkout@v3 - - name: BUILD - run: build.sh \ No newline at end of file