forked from PlayForm/Starter
-
Notifications
You must be signed in to change notification settings - Fork 0
117 lines (104 loc) · 3.97 KB
/
Cache.yml
File metadata and controls
117 lines (104 loc) · 3.97 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: Cache
concurrency:
group: Cache-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
on:
workflow_dispatch:
schedule:
# Daily at 12:00 UTC, offset from Auto.yml (00:00 UTC) so the two
# never race for the branch tip.
- cron: "0 12 * * *"
workflow_call:
jobs:
Refresh:
runs-on: ubuntu-latest
env:
ADBLOCK: true
ASTRO_TELEMETRY_DISABLED: 1
AUTOMATEDLAB_TELEMETRY_OPTOUT: 1
AZURE_CORE_COLLECT_TELEMETRY: 0
CHOOSENIM_NO_ANALYTICS: 1
DIEZ_DO_NOT_TRACK: 1
DO_NOT_TRACK: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_INTERACTIVE_CLI_TELEMETRY_OPTOUT: 1
ET_NO_TELEMETRY: 1
GATSBY_TELEMETRY_DISABLED: 1
GATSBY_TELEMETRY_OPT_OUT: 1
GATSBY_TELEMETRY_OPTOUT: 1
GRIT_TELEMETRY_DISABLED: 1
HASURA_GRAPHQL_ENABLE_TELEMETRY: false
HINT_TELEMETRY: off
HOMEBREW_NO_ANALYTICS: 1
INFLUXD_REPORTING_DISABLED: true
ITERATIVE_DO_NOT_TRACK: 1
NEXT_TELEMETRY_DEBUG: 1
NEXT_TELEMETRY_DISABLED: 1
NG_CLI_ANALYTICS: false
NUXT_TELEMETRY_DISABLED: 1
PIN_DO_NOT_TRACK: 1
POWERSHELL_TELEMETRY_OPTOUT: 1
SAM_CLI_TELEMETRY: 0
STNOUPGRADE: 1
STRIPE_CLI_TELEMETRY_OPTOUT: 1
TELEMETRY_DISABLED: 1
TERRAFORM_TELEMETRY: 0
VCPKG_DISABLE_METRICS: 1
NODE_ENV: production
TOKEN: ${{ secrets.TOKEN }}
steps:
- name: Verify TOKEN secret is configured
run: |
if [ -z "$TOKEN" ]; then
echo "::error::TOKEN secret is empty or not set."
echo "Add a comma-separated list of GitHub PATs at:"
echo " Repo → Settings → Secrets and variables → Actions"
echo " Name: TOKEN"
echo " Value: ghp_aaa,ghp_bbb,ghp_ccc"
exit 1
fi
echo "TOKEN configured (length=${#TOKEN}, parts=$(echo -n "$TOKEN" | tr ',' '\n' | wc -l))"
- uses: actions/checkout@v6.0.1
with:
ref: Current
fetch-depth: 0
- uses: pnpm/action-setup@v4.2.0
with:
version: 9.3.0
run_install: |
- recursive: true
args: [
--link-workspace-packages=true,
--lockfile-only,
--prefer-frozen-lockfile=false,
--shamefully-hoist=false,
--shared-workspace-lockfile=true,
--strict-peer-dependencies=false,
--unsafe-perm=true
]
- uses: actions/setup-node@v6.1.0
with:
node-version: 22
cache: "pnpm"
cache-dependency-path: ./pnpm-lock.yaml
- run: pnpm install
working-directory: .
- name: Build (refresh GitHub API cache)
run: pnpm run prepublishOnly
working-directory: .
- name: Commit refreshed cache
run: |
git config user.name "Auto"
git config user.email "Commit@PlayForm.Cloud"
git add Cache/Table Public/Cache Target
if ! git diff --staged --quiet; then
git commit -m "Cache: Refresh GitHub API cache ($(date -u +%Y-%m-%dT%H:%MZ))"
else
echo "Cache: No changes to commit."
fi
- uses: ad-m/github-push-action@v0.8.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: Current