Skip to content

Commit b8f0173

Browse files
author
Tomasz Gągor
committed
ci(github): dependabot upgrades should be treated as standard releases, not weekly rebuilds
1 parent 8ec383b commit b8f0173

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@ name: build
33
on:
44
push:
55
paths-ignore:
6-
- 'README.md'
6+
- README.md
77
branches:
88
- master
9-
- 'feature/*'
10-
- 'bugfix/*'
9+
- "feature/*"
10+
- "bugfix/*"
1111
tags:
12-
- '*.*.*'
12+
- "*.*.*"
1313
pull_request:
1414
branches:
1515
- master
1616
schedule:
1717
# weekly: at 04:13 on Monday
18-
- cron: '13 4 * * 1'
18+
- cron: "13 4 * * 1"
1919

2020
jobs:
2121
build:
@@ -95,7 +95,7 @@ jobs:
9595
fi
9696
9797
- name: Create normal GitHub release
98-
if: github.ref == 'refs/heads/master' && github.event_name != 'schedule'
98+
if: github.ref == 'refs/heads/master' && (github.event_name != 'schedule' || github.actor == 'dependabot[bot]')
9999
uses: actions/create-release@v1
100100
env:
101101
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -105,11 +105,11 @@ jobs:
105105
body: ${{ steps.tag_version.outputs.changelog }}
106106

107107
- name: Get current date
108-
if: github.event_name == 'schedule'
108+
if: github.event_name == 'schedule' && github.actor != 'dependabot[bot]'
109109
id: date
110110
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
111111
- name: Create a weekly GitHub release
112-
if: github.event_name == 'schedule'
112+
if: github.event_name == 'schedule' && github.actor != 'dependabot[bot]'
113113
uses: actions/create-release@v1
114114
env:
115115
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -119,7 +119,6 @@ jobs:
119119
body: |
120120
Weekly rebuild on ${{ steps.date.outputs.date }}
121121
122-
123122
security-scan:
124123
runs-on: ubuntu-latest
125124
needs:
@@ -144,7 +143,7 @@ jobs:
144143
with:
145144
image-ref: ghcr.io/tgagor/centos:${{ matrix.tag }}-${{ github.sha }}
146145
format: template
147-
template: '@/contrib/sarif.tpl'
146+
template: "@/contrib/sarif.tpl"
148147
# don't fail
149148
exit-code: 0
150149
output: trivy-results.sarif

0 commit comments

Comments
 (0)