diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c3eee2e..a888ebd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -50,6 +50,17 @@ jobs: run: | sops -e -gcp-kms projects/devops-course-prometheus/locations/global/keyRings/sops-flux/cryptoKeys/sops-keys-flux --encrypted-regex '^(TELE_TOKEN)$' secret.yaml > secret-encrypted.yaml cat secret-encrypted.yaml + + - name: Clone Flux repo and add encrypted secret + run: | + git config user.name github-actions + git config user.email github-actions@github.com + git clone git@github.com:silhouetteUA/gitops-flux-sops.git . + mv secret-encrypted.yaml cluster/fluxcd-gke/resources + git add . + git commit -m "add encrypted secret to flux repo" + git remote add flux-repo git@github.com:silhouetteUA/gitops-flux-sops.git + git push -u flux-repo main # ci: