Skip to content

Commit 0e41a4a

Browse files
committed
add comment on pr, do not run various steps on main
1 parent 342ed51 commit 0e41a4a

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

.github/workflows/blackduck.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,9 @@ jobs:
3636
go build -o target/ ./cmd/...
3737
go test -v ./...
3838
shell: bash -euo pipefail -c "source nix.source && exec bash {0}"
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
39+
- uses: ./.github/actions/blackduck-scan
40+
- name: Rename notices file
41+
if: github.ref != 'refs/heads/main'
4342
run: |
4443
files=( *Black_Duck_Notices_Report.txt )
4544
if [ "${#files[@]}" -eq 1 ]; then
@@ -50,7 +49,7 @@ jobs:
5049
fi
5150
shell: bash -euo pipefail -c "source nix.source && exec bash {0}"
5251
- name: Add comment to PR
53-
if: github.event_name == 'pull_request'
52+
if: github.ref != 'refs/heads/main'
5453
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd
5554
with:
5655
script: |
@@ -60,7 +59,9 @@ jobs:
6059
repo: context.repo.repo,
6160
body: "Auto-generated NOTICES file has been commited back to this PR by GitHub Actions"
6261
})
62+
github-token: '${{ secrets.AUTO_REBASE_PAT }}'
6363
- name: Commit and push changes
64+
if: github.ref != 'refs/heads/main'
6465
run: |
6566
git config user.name "github-actions[bot]"
6667
git config user.email "github-actions[bot]@users.noreply.github.com"

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
124124
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
125125
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
126126
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
127+
github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3VRLtww=
128+
github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY=
127129
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
128130
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
129131
github.com/samber/lo v1.52.0 h1:Rvi+3BFHES3A8meP33VPAxiBZX/Aws5RxrschYGjomw=

0 commit comments

Comments
 (0)