Add support for bypassing static build cache on PRs. (#14646)
Austin S. Hemmelgarn committed
Mar 3, 2023 at 12:44 UTC
af360d8b0f31d6fe463928a0f26787861daaa4c2
1 file changed
+4
-2
.github/workflows/build.yml
+4
-2
@@ -118,9 +118,11 @@ jobs:
118
run: |
119
sed -i 's/^RELEASE_CHANNEL="nightly" *#/RELEASE_CHANNEL="stable" #/' netdata-installer.sh packaging/makeself/install-or-update.sh
120
- name: Get Cache Key
121
+ if: github.event_name != 'pull_request' || ! contains(github.event.pull_request.labels.*.name, 'run-ci/no-cache')
122
id: cache-key
122
- run: .github/scripts/get-static-cache-key.sh ${{ matrix.arch }}
123
+ run: .github/scripts/get-static-cache-key.sh ${{ matrix.arch }} "${{ contains(github.event.pull_request.labels.*.name, 'run-ci/no-cache') }}"
124
- name: Cache
125
+ if: github.event_name != 'pull_request' || ! contains(github.event.pull_request.labels.*.name, 'run-ci/no-cache')
126
id: cache
127
uses: actions/cache@v3
128
with:
@@ -135,7 +137,7 @@ jobs:
137
uses: nick-fields/retry@v2
138
with:
139
timeout_minutes: 180
138
- retries: 3
140
+ max_attempts: 3
141
command: .github/scripts/build-static.sh ${{ matrix.arch }}
142
- name: Store
143
id: store