]> sigrok.org Git - sigrok-cli.git/commitdiff
build.yml: PR status updates are pointless, remove them master github/master
authorSoeren Apel <redacted>
Mon, 26 Aug 2024 14:58:02 +0000 (16:58 +0200)
committerSoeren Apel <redacted>
Mon, 26 Aug 2024 14:58:02 +0000 (16:58 +0200)
.github/workflows/build.yml

index c499750dc53147fd0335ad5858bad1585ff341e2..e88d77f992c32b7e5f99fee00d8f711d8f69738f 100644 (file)
@@ -1,4 +1,4 @@
-name: sigrok-cli Artifact Builder Workflow
+name: Build sigrok-cli artifacts
 
 on:
   push:                # When the repo itself has a new commit on the master branch
@@ -12,120 +12,6 @@ on:
       - synchronize    # When a pull request's branch was updated with a new commit
 
 jobs:
-  create-pending-status:
-    name: Create pending status
-    # Run this only for pull requests
-    if: (github.event_name == 'pull_request')
-    runs-on: ubuntu-latest
-
-    steps:
-    - name: Get PR hash
-      id: sha
-      uses: actions/github-script@v7
-      with:
-        result-encoding: string
-        script: |
-          const { owner, repo, number } = context.issue;
-          const pr = await github.rest.pulls.get({
-            owner,
-            repo,
-            pull_number: number,
-          });
-          return pr.data.head.sha
-
-    - name: Create pending status check
-      uses: actions/github-script@v7
-      with:
-        script: |
-          github.rest.repos.createCommitStatus({
-            owner: context.repo.owner,
-            repo: context.repo.repo,
-            sha: "${{ steps.sha.outputs.result }}",
-            state: "pending",
-            target_url: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
-            description: "Running",
-            context: "pr build"
-          });
-
-  update-pending-status-success:
-    name: Update pending status as 'success'
-    needs: call-build-workflow
-    # Note: always() is a workaround, see https://github.com/actions/runner/issues/491#issuecomment-850884422
-    if: |
-      always() &&
-      (github.event_name == 'pull_request') &&
-      (!contains(needs.*.result, 'cancelled')) &&
-      (!contains(needs.*.result, 'failure'))
-    runs-on: ubuntu-latest
-
-    steps:
-      - name: Get PR hash
-        id: sha
-        uses: actions/github-script@v7
-        with:
-          result-encoding: string
-          script: |
-            const { owner, repo, number } = context.issue;
-            const pr = await github.rest.pulls.get({
-              owner,
-              repo,
-              pull_number: number,
-            });
-            return pr.data.head.sha
-
-      - name: Update status
-        uses: actions/github-script@v7
-        with:
-          script: |
-            github.rest.repos.createCommitStatus({
-              owner: context.repo.owner,
-              repo: context.repo.repo,
-              sha: "${{ steps.sha.outputs.result }}",
-              state: "success",
-              target_url: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
-              description: "Success",
-              context: "pr build"
-            });
-
-  update-pending-status-failure:
-    name: Update pending status as 'failure'
-    needs: call-build-workflow
-    # Note: always() is a workaround, see https://github.com/actions/runner/issues/491#issuecomment-850884422
-    if: |
-      always() &&
-      (github.event_name == 'pull_request') &&
-      (contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'failure'))
-    runs-on: ubuntu-latest
-
-    steps:
-      - name: Get PR hash
-        id: sha
-        uses: actions/github-script@v7
-        with:
-          result-encoding: string
-          script: |
-            const { owner, repo, number } = context.issue;
-            const pr = await github.rest.pulls.get({
-              owner,
-              repo,
-              pull_number: number,
-            });
-            return pr.data.head.sha
-
-      - name: Update status
-        uses: actions/github-script@v7
-        with:
-          script: |
-            github.rest.repos.createCommitStatus({
-              owner: context.repo.owner,
-              repo: context.repo.repo,
-              sha: "${{ steps.sha.outputs.result }}",
-              state: "failure",
-              target_url: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
-              description: "Failure",
-              context: "pr build"
-            });
-
   call-build-workflow:
     name: Sigrok artifact builder
     uses: sigrokproject/sigrok-build/.github/workflows/build.yml@master