Skip to content

Commit 31e0769

Browse files
authored
gh: add cache buster
1 parent 9f66818 commit 31e0769

2 files changed

Lines changed: 16 additions & 6 deletions

File tree

.github/workflows/private.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
'BASE_IMAGE': |-
33
${{ vars.BASE_IMAGE || 'adguard/go-builder:1.26.5--1' }}
44
'CACHE_BUSTER': |-
5-
${{ vars.CACHE_BUSTER || '0' }}
5+
${{ inputs.cache_buster || '0' }}
66
'jobs':
77
'LintAndTestJobDocker':
88
'if': |
@@ -113,7 +113,13 @@
113113
'push':
114114
'branches':
115115
- '*'
116-
'workflow_dispatch': null
116+
'workflow_dispatch':
117+
'inputs':
118+
'cache_buster':
119+
'default': ''
120+
'description': |
121+
Override to force re-run of cached stages (pass any unique value).
122+
'type': 'string'
117123
# Permissions are disabled for all the jobs by default, and then overridden for
118124
# specific jobs if needed. This is a recommended practice for security reasons,
119125
# and also allows to avoid mistakes with permissions when creating new jobs.

.github/workflows/release.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
'env':
22
'BASE_IMAGE': |-
33
${{ vars.BASE_IMAGE || 'adguard/go-builder:1.26.5--1' }}
4-
'CACHE_BUSTER': |-
5-
${{ vars.CACHE_BUSTER || '0' }}
64
'DIST_DIR': |-
75
build
86
'jobs':
@@ -32,7 +30,7 @@
3230
APP_VERSION=${{ github.ref_name }}
3331
BASE_IMAGE=${{ env.BASE_IMAGE }}
3432
BRANCH=${{ github.ref_name }}
35-
CACHE_BUSTER=${{ env.CACHE_BUSTER }}
33+
CACHE_BUSTER=${{ inputs.cache_buster || '0' }}
3634
DIST_DIR=${{ env.DIST_DIR }}
3735
REVISION=${{ github.sha }}
3836
SOURCE_DATE_EPOCH=${{ env.SOURCE_DATE_EPOCH }}
@@ -83,7 +81,13 @@
8381
- 'v*'
8482
'branches':
8583
- 'master'
86-
'workflow_dispatch': null
84+
'workflow_dispatch':
85+
'inputs':
86+
'cache_buster':
87+
'default': ''
88+
'description': |
89+
Override to force re-run of cached stages (pass any unique value).
90+
'type': 'string'
8791
# Permissions are disabled for all the jobs by default, and then overridden for
8892
# specific jobs if needed. This is a recommended practice for security reasons,
8993
# and also allows to avoid mistakes with permissions when creating new jobs.

0 commit comments

Comments
 (0)