-
Notifications
You must be signed in to change notification settings - Fork 5k
36 lines (30 loc) · 1.23 KB
/
labeler-cache-retention.yml
File metadata and controls
36 lines (30 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Workflow template imported from:
# https://github.com/dotnet/.github/workflow-templates
#
# Regularly restore the prediction model from cache to prevent cache eviction
name: "Labeler: Cache Retention"
# For more information about GitHub's action cache limits and eviction policy, see:
# https://docs.github.com/actions/writing-workflows/choosing-what-your-workflow-does/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy
on:
schedule:
- cron: "24 12 * * *" # 12:24 UTC every day (arbitrary time daily)
workflow_dispatch:
inputs:
cache_key:
description: "The cache key suffix to use for restoring the model from cache. Defaults to 'ACTIVE'."
required: true
default: "ACTIVE"
env:
CACHE_KEY: ${{ inputs.cache_key || 'ACTIVE' }}
permissions: {}
jobs:
restore-cache:
# Do not automatically run the workflow on forks outside the 'dotnet' org
if: ${{ github.event_name == 'workflow_dispatch' || github.repository_owner == 'dotnet' }}
runs-on: ubuntu-latest
steps:
- uses: dotnet/issue-labeler/restore@46125e85e6a568dc712f358c39f35317366f5eed # v2.0.0
with:
type: "issues"
cache_key: ${{ env.CACHE_KEY }}
fail-on-cache-miss: true