Skip to content

Commit d016d62

Browse files
authored
Report workflow actions failures to sentry (#32)
* update pr-auditor and report failures for auditor and nix build * fix checksums ran All checksums are good! Part of https://github.com/sourcegraph/sourcegraph/issues/59055
1 parent 0046aa4 commit d016d62

3 files changed

Lines changed: 27 additions & 14 deletions

File tree

.github/workflows/nix-build-and-upload.yaml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: nix_p4-fusion
22

33
on:
44
push:
5-
branches:
5+
branches:
66
- master
77
pull_request:
88

@@ -21,7 +21,7 @@ jobs:
2121
- name: Run `nix build`
2222
run: |
2323
nix build .#p4-fusion_openssl1_1-static
24-
- name: Sign the binary
24+
- name: Sign the binary
2525
# signing in ./result/bin will cause a cache miss on next invocation
2626
run: |
2727
mkdir -p dist
@@ -55,7 +55,7 @@ jobs:
5555
- name: Run `nix build`
5656
run: |
5757
nix build .#p4-fusion_openssl1_1-static
58-
- name: Sign the binary
58+
- name: Sign the binary
5959
# signing in ./result/bin will cause a cache miss on next invocation
6060
run: |
6161
mkdir -p dist
@@ -104,4 +104,10 @@ jobs:
104104
with:
105105
path: './dist/'
106106
destination: 'p4-fusion/x86_64-linux/'
107-
glob: 'p4-fusion*'
107+
glob: 'p4-fusion*'
108+
109+
report_failure:
110+
needs: [aarch64-darwin, x86_64-darwin, x86_64-linux]
111+
if: ${{ failure() }}
112+
uses: sourcegraph/sourcegraph/.github/workflows/report-job-failure.yml@main
113+
secrets: inherit

.github/workflows/pr-auditor.yaml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,25 @@ name: pr-auditor
33
on:
44
pull_request_target:
55
types: [ closed, edited, opened, synchronize, ready_for_review ]
6+
workflow_dispatch:
67

78
jobs:
89
check-pr:
910
runs-on: ubuntu-latest
1011
steps:
1112
- uses: actions/checkout@v3
12-
with: { repository: 'sourcegraph/pr-auditor' }
13+
with:
14+
repository: 'sourcegraph/pr-auditor'
1315
- uses: actions/setup-go@v4
14-
with: { go-version: '1.20' }
16+
with: { go-version: '1.21' }
1517

16-
- run: ./check-pr.sh
18+
- run: './check-pr.sh'
1719
env:
1820
GITHUB_EVENT_PATH: ${{ env.GITHUB_EVENT_PATH }}
19-
GITHUB_TOKEN: ${{ github.token }}
21+
GITHUB_TOKEN: ${{ secrets.PR_AUDITOR_TOKEN }}
2022
GITHUB_RUN_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
23+
report_failure:
24+
needs: check-pr
25+
if: ${{ failure() }}
26+
uses: sourcegraph/sourcegraph/.github/workflows/report-job-failure.yml@main
27+
secrets: inherit

nix/helix-core-api.nix

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,34 @@
44
aarch64-darwin = fetchzip {
55
name = "helix-core-api";
66
url = "https://cdist2.perforce.com/perforce/r23.1/bin.macosx12arm64/p4api-openssl1.1.1.tgz";
7-
hash = "sha256-gblxNxyvjGHmrE54178JN4NTvI2EW3a58Yj7KngEr1o=";
7+
hash = "sha256-MiRKvW/IbA1AcNpFWCIBGsYomelCLrTU04+Vq5yyUVI=";
88
};
99
x86_64-darwin = fetchzip {
1010
name = "helix-core-api";
1111
url = "https://cdist2.perforce.com/perforce/r23.1/bin.macosx12x86_64/p4api-openssl1.1.1.tgz";
12-
hash = "sha256-9H0qbYU9yFcdqooLvXSkqYIiYIX9d+BaSh9dlMo1D5Q=";
12+
hash = "sha256-QF69oWI8qqST9ELJrEzx4pFQik/RsEmsRVq7EOo5gt0=";
1313
};
1414
x86_64-linux = fetchzip {
1515
name = "helix-core-api";
1616
url = "https://cdist2.perforce.com/perforce/r23.1/bin.linux26x86_64/p4api-glibc2.3-openssl1.1.1.tgz";
17-
hash = "sha256-SBeHjVuodRlLmAYA7/5qSASmneKaa7acXvhEPTxQd/w=";
17+
hash = "sha256-R8oP1uJ70J2XRToLAPAVKxU/VEr2e6LlaR3zn21lKaI=";
1818
};
1919
};
2020
"3.0" = {
2121
aarch64-darwin = fetchzip {
2222
name = "helix-core-api";
2323
url = "https://cdist2.perforce.com/perforce/r23.1/bin.macosx12arm64/p4api-openssl3.tgz";
24-
hash = "sha256-s75750zXUxLbx3Bs2kjtGTKI1sKHO+tAQTF2d0dc234=";
24+
hash = "sha256-SVAw1ADhd7pwgHprE+J61bp5AiP9ULCw64WeN5MVV9M=";
2525
};
2626
x86_64-darwin = fetchzip {
2727
name = "helix-core-api";
2828
url = "https://cdist2.perforce.com/perforce/r23.1/bin.macosx12x86_64/p4api-openssl3.tgz";
29-
hash = "sha256-uCR91Kbidq8DyJSw+Dpmiyn66LIkveNHZFwCfbBZ6dk=";
29+
hash = "sha256-HhSmQWfX9yh734FtG14BzIQY9YliAH9kV5RaQ71T0RU=";
3030
};
3131
x86_64-linux = fetchzip {
3232
name = "helix-core-api";
3333
url = "https://cdist2.perforce.com/perforce/r23.1/bin.linux26x86_64/p4api-glibc2.3-openssl3.tgz";
34-
hash = "sha256-JaFjUjJP1GQ4iFCtuWbhYNonH3PiNlgI0z2L6UsN1JE=";
34+
hash = "sha256-oJzHuq8/9PgGi6e1/bxXuaZER5+DR5tmCIN21/fVImQ=";
3535
};
3636
};
3737
}

0 commit comments

Comments
 (0)