-
Notifications
You must be signed in to change notification settings - Fork 278
40 lines (31 loc) · 1.12 KB
/
update-cache.yaml
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
name: Update prod cache of build materials
on:
push:
branches: ['main']
env:
PROJECT: prod-images-c6e5
FQ_SERVICE_ACCOUNT: [email protected]
SOURCE_CACHE_BUCKET: wolfi-sources
jobs:
update-cache:
runs-on: ubuntu-latest
if: github.repository == 'wolfi-dev/os'
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: chainguard-dev/actions/setup-melange@main
- uses: google-github-actions/auth@v1
with:
workload_identity_provider: "projects/618116202522/locations/global/workloadIdentityPools/prod-shared-e350/providers/prod-shared-gha"
service_account: ${{env.FQ_SERVICE_ACCOUNT}}
- uses: google-github-actions/setup-gcloud@v1
with:
project_id: ${{env.PROJECT}}
- name: 'Update cache of build materials for all packages'
run: |
for cfg in $(ls -1 | grep '.*\.yaml'); do
echo "Updating cache for ${cfg}...";
melange update-cache --cache-dir gs://${{env.SOURCE_CACHE_BUCKET}}/ "${cfg}" || true;
done