Skip to content

feat: add gcs-sync-reusable workflow - #33

Closed
Gabrymi93 wants to merge 1 commit into
mainfrom
feat/gcs-sync-reusable
Closed

Gabrymi93 wants to merge 1 commit into
mainfrom
feat/gcs-sync-reusable

Conversation

@Gabrymi93

Copy link
Copy Markdown
Member

Summary

Nuovo reusable workflow gcs-sync-reusable.yml per sincronizzare gli output pipeline su Google Cloud Storage.

What changes

  • Aggiunto .github/workflows/gcs-sync-reusable.yml — workflow riusabile che wrappa auth (WIF + SA key legacy) + setup gcloud + rsync

Motivation

Il pattern GCS auth → gcloud setup → rsync è copia-incollato in 6 repo con variazioni. Questo viola ADR-001 rule 2: "Stesso passo in 2+ repo → componente condiviso".

Patterns supportati

Input Default Descrizione
sync-pattern flat flat = rsync intera dir, per-dataset = per slug
layers clean mart Space-separated layers
year vuoto Anno fisso o auto-detect
sync-years false Includi anno nel path GCS
exclude vuoto Regex per rsync -x
flat-files false Copia parquet flat nella root slug
skip-sync false Salta sync (solo auth)

Auth

  • WIF (consigliato): google-github-actions/auth@v3
  • SA key (legacy): JSON o base64, pattern identico a gcs-auth action

New reusable workflow for GCS sync across data repos.
Wraps auth (WIF + SA key legacy) + setup gcloud + rsync.

Patterns supported:
- flat: rsync entire out/data/{clean,mart}/ to repo prefix
- per-dataset: per slug dir with optional year, exclude, flat files

Replaces inline GCS auth + sync logic duplicated across 6 repos.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant