Skip to content

Commit 8241fd6

Browse files
committed
Stop keeping pull request builds as long as releases (issue #615)
A pull request build is worth downloading while the pull request is open and not much after it, and a second push to a branch starts a full matrix build beside the one already running rather than replacing it. * Keep what a pull request uploads for a week, and everything master and the tags upload for the 90 days they are kept now * Group runs by pull request so a push replaces the run in flight, and fall back to the run id everywhere else, which gives master and tag builds a group each and leaves them to finish
1 parent cf342c1 commit 8241fd6

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎.github/workflows/BuildPR.yml‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
- '*'
99
pull_request:
1010

11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
13+
cancel-in-progress: true
14+
1115
jobs:
1216
build-gitx:
1317
name: build
@@ -105,6 +109,7 @@ jobs:
105109
with:
106110
name: UnitTestResults-${{ matrix.abi }}.xcresult
107111
path: UnitTestResults-${{ matrix.abi }}.xcresult
112+
retention-days: ${{ github.event_name == 'pull_request' && 7 || 90 }}
108113

109114
# Test (only on arm64 to avoid tripling CI time)
110115
- name: Prepare screenshot comparison
@@ -138,6 +143,7 @@ jobs:
138143
with:
139144
name: Screenshots-${{ matrix.abi }}
140145
path: ./scripts/screenshots-${{ matrix.abi }}
146+
retention-days: ${{ github.event_name == 'pull_request' && 7 || 90 }}
141147
- name: Compare screenshots
142148
if: ${{ env.variableSet != '' && matrix.abi == 'arm64' && github.event_name == 'pull_request' }}
143149
env:
@@ -155,6 +161,7 @@ jobs:
155161
name: gitx-Screenshots-diffs-${{ matrix.abi }}
156162
path: |
157163
screenshotDiffs
164+
retention-days: ${{ github.event_name == 'pull_request' && 7 || 90 }}
158165
# - name: Show git status
159166
# if: ${{ always() && matrix.abi == 'arm64' && github.event_name == 'pull_request' }}
160167
# run: |
@@ -234,11 +241,13 @@ jobs:
234241
name: GitX-${{ matrix.abi }}.dmg
235242
path: GitX-${{ matrix.abi }}.dmg
236243
overwrite: true
244+
retention-days: ${{ github.event_name == 'pull_request' && 7 || 90 }}
237245
- name: Upload zip
238246
uses: actions/upload-artifact@v7
239247
with:
240248
name: GitX-${{ matrix.abi }}.zip
241249
path: GitX-${{ matrix.abi }}.zip
250+
retention-days: ${{ github.event_name == 'pull_request' && 7 || 90 }}
242251
- name: Clean up keychain and provisioning profile
243252
if: ${{ env.variableSet != '' }}
244253
run: |

0 commit comments

Comments
 (0)