@@ -4,10 +4,9 @@ defaults:
44 shell : bash -euo pipefail -c "source nix.source && source .envrc.vars && exec bash {0}"
55on :
66 push :
7- branches :
8- - ' blackduck*'
9- schedule :
10- - cron : ' 0 10 * * *' # 5am US Eastern Time (UTC+5)
7+ paths :
8+ - go.mod
9+ - go.sum
1110
1211concurrency :
1312 group : ${{ github.workflow }}-${{ github.ref }}
1918
2019jobs :
2120 scan :
22- runs-on : dach-ny-dpm
21+ runs-on : digital-asset-dpm
22+ permissions :
23+ contents : write
24+ pull-requests : write
2325 steps :
24- - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
26+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
2527 with :
2628 fetch-depth : 0
29+ token : ${{ secrets.AUTO_REBASE_PAT }}
2730 - uses : ./.github/actions/nix
2831 - uses : ./.github/actions/gcloud-login
2932 with :
3336 go build -o target/ ./cmd/...
3437 go test -v ./...
3538 shell : bash -euo pipefail -c "source nix.source && exec bash {0}"
36- - uses : ./.github/actions/blackduck-scan
37-
39+ - if : ${{ ! contains(github.event.head_commit.message, '[skip notices]') }}
40+ uses : ./.github/actions/blackduck-scan
41+ - if : ${{ ! contains(github.event.head_commit.message, '[skip notices]') }}
42+ name : Rename notices file
43+ run : |
44+ files=( *Black_Duck_Notices_Report.txt )
45+ if [ "${#files[@]}" -eq 1 ]; then
46+ mv -- "${files[0]}" NOTICES
47+ else
48+ echo "Expected exactly one *Black_Duck_Notices_Report.txt file, found ${#files[@]}" >&2
49+ exit 1
50+ fi
51+ shell : bash -euo pipefail -c "source nix.source && exec bash {0}"
52+ - name : Commit and push changes
53+ run : |
54+ git config user.name "github-actions[bot]"
55+ git config user.email "github-actions[bot]@users.noreply.github.com"
56+ git add NOTICES
57+ git commit -m "Update NOTICES after go.mod change" || echo "No changes to commit"
58+ git push
59+ shell : bash -euo pipefail -c "source nix.source && exec bash {0}"
0 commit comments