Skip to content

Commit 0b8ce5d

Browse files
committed
CI: add a clean cache workflow_dispatch option
1 parent a04055e commit 0b8ce5d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/Build.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ on:
44
- master
55
pull_request:
66
workflow_dispatch:
7+
inputs:
8+
clean_cache:
9+
description: Clean Docker cache before build, yes/no
10+
default: 'no'
11+
required: false
712
schedule:
813
- cron: '0 0 1 */2 *'
914

@@ -125,7 +130,7 @@ jobs:
125130
restore-keys: |
126131
${{ runner.os }}-${{ matrix.os.arch }}-${{ matrix.env.TARGET }}-buildx-
127132
- name: Clean Docker cache
128-
if: "contains(github.event.head_commit.message, '[clean cache]')"
133+
if: ${{ contains(github.event.head_commit.message, '[clean cache]') || github.event.inputs.clean_cache == 'yes' }}
129134
continue-on-error: true
130135
run: |
131136
rm -rf /tmp/.buildx-cache

0 commit comments

Comments
 (0)