Skip to content

Commit

Permalink
Add all secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
titigmr committed May 2, 2023
1 parent 164cab8 commit 1b1366d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/change-values.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,19 @@ on:
required: true
X_OVH_TOKEN:
required: true
OS_PASSWORD:
required: true
OS_PROJECT_ID:
required: true
OS_PROJECT_NAME:
required: true
OS_USERNAME:
required: true
CLUSTER_URL:
required: true
JOB_GITHUB_TOKEN:
required: true

jobs:
deployment:
name: Update deployment
Expand All @@ -35,8 +48,8 @@ jobs:
- uses: azure/k8s-set-context@v3
with:
method: service-account
k8s-url: ${{ secrets.K8_CLUSTER_URL }}
k8s-secret: ${( secrets.SA_SECRET )}
k8s-url: ${{ secrets.CLUSTER_URL }}
k8s-secret: ${( secrets.SA_SECRET }}

- name: Create secret for Kubernetes
uses: azure/k8s-create-secret@v2
Expand Down Expand Up @@ -66,6 +79,6 @@ jobs:
- name: Commit and push changes
uses: devops-infra/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_token: ${{ secrets.JOB_GITHUB_TOKEN }}
commit_prefix: "[skip ci]"
commit_message: "Version updated"
10 changes: 9 additions & 1 deletion .github/workflows/update-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,13 @@ jobs:
namespace: "basegun-preprod" # reuse environment github in namespace
branch: ${{ github.ref_name }}
secrets:
SA_SECRET: ${{ secrets.K8_PREPROD_TOKEN }}
# environment dependant
SA_SECRET: ${{ secrets.PREPROD_K8_TOKEN }}
X_OVH_TOKEN: ${{ secrets.PREPROD_OVH_TOKEN }}

# static variables
CLUSTER_URL: ${{ secrets.CLUSTER_URL }}
OS_PASSWORD: ${{ secrets.OS_PASSWORD }}
OS_PROJECT_NAME: ${{ secrets.OS_PROJECT_NAME }}
OS_USERNAME: ${{ secrets.OS_USERNAME }}
API_OVH_TOKEN: ${{ secrets.API_OVH_TOKEN }}

0 comments on commit 1b1366d

Please sign in to comment.