Skip to content

Update prod cache of build materials #7656

Update prod cache of build materials

Update prod cache of build materials #7656

Workflow file for this run

name: Update prod cache of build materials
on:
workflow_dispatch:
# Triggers the workflow every six hours
schedule:
- cron: "0 */6 * * *"
env:
PROJECT: prod-images-c6e5
FQ_SERVICE_ACCOUNT: prod-images-ci@prod-images-c6e5.iam.gserviceaccount.com
SOURCE_CACHE_BUCKET: wolfi-sources
permissions:
contents: read
jobs:
update-cache:
runs-on: ubuntu-latest
if: github.repository == 'wolfi-dev/os'
permissions:
contents: read
id-token: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: chainguard-dev/actions/setup-melange@2cadca168a422313df94f6169691a86498ae51b1 # main
- uses: google-github-actions/auth@55bd3a7c6e2ae7cf1877fd1ccb9d54c0503c457c # v2.1.2
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@98ddc00a17442e89a24bbf282954a3b65ce6d200 # v2.1.0
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