-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ivo Hlavaty
committed
Dec 12, 2023
1 parent
487e8c9
commit 41ee2c6
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
--- | ||
name: sync secrets | ||
on: # yamllint disable-line rule:truthy | ||
push: | ||
branches: | ||
- engops_maintenance | ||
permissions: | ||
id-token: write | ||
contents: read | ||
jobs: | ||
sync: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Login to Azure | ||
uses: azure/login@v1 | ||
with: | ||
client-id: ${{ vars.GH_APP_ORG_ENGOPS_MAINTENANCE_CLIENT_ID }} | ||
tenant-id: ${{ vars.AZURE_SWI_TENANT_ID }} | ||
subscription-id: ${{ vars.AZURE_ITSANDBOX_SUBSCRIPTION_ID }} | ||
- name: 'set-org-secret' | ||
run: | | ||
echo "Syncing CODECOV_TOKEN ..." | ||
SECRET="CODECOV_TOKEN" | ||
SECRET_NAME="vividcortex--ewma--${SECRET//_/-}" | ||
[ ! -z "${{ secrets.CODECOV_TOKEN }}" ] && az keyvault secret set --name "$SECRET_NAME" --vault-name "gh-scs" --value "${{ secrets.CODECOV_TOKEN }}" |