Skip to content

Commit

Permalink
more changes to CICD
Browse files Browse the repository at this point in the history
  • Loading branch information
Pascal-Delange committed Oct 25, 2024
1 parent 499e9d4 commit da2974b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ name: Release Charts
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
CHART_NAME: ${{vars.CHART_NAME}}
CHART_VERSION: ${{vars.CHART_VERSION}}
CHART_VERSION: ${{ github.ref_name }}

jobs:
release:
Expand All @@ -24,11 +24,6 @@ jobs:
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

- name: Google Auth
uses: "google-github-actions/auth@v2"
with:
credentials_json: "${{ secrets.GCP_SA_KEY_PRODUCTION }}"

- name: "Set up Cloud SDK"
uses: "google-github-actions/setup-gcloud@v2"
with:
Expand All @@ -37,7 +32,7 @@ jobs:
- name: Login to artifact registry
run: |
cd kubernetes
gcloud auth activate-service-account ${{vars.ACCOUNT}} --key-file ${{secrets.KEY_FILE}}
gcloud auth activate-service-account ${{vars.SERVICE_ACCOUNT_NAME}} --key-file ${{secrets.GCP_SA_KEY_PRODUCTION}}
cat key.json | helm registry login -u _json_key --password-stdin https://${{vars.ARTIFACT_REGISTRY_HOST_NAME}}
- name: Prepare YQ
Expand All @@ -60,4 +55,4 @@ jobs:
- name: Helm push
run: |
cd kubernetes
helm push $CHART_NAME-$CHART_VERSION.tgz oci://${{vars.ARTIFACT_REGISTRY_HOST_NAME}}/${{vars.INFRA_PROJECT_ID}}/${{vars.ARTIFACT_REGISTRY_REPOSITORY}}
helm push $CHART_NAME-${{ github.ref_name }}.tgz oci://${{vars.ARTIFACT_REGISTRY_HOST_NAME}}/${{vars.INFRA_PROJECT_ID}}/${{vars.ARTIFACT_REGISTRY_REPOSITORY}}
4 changes: 2 additions & 2 deletions kubernetes/.vars
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARTIFACT_REGISTRY_HOST_NAME=europe-west1-docker.pkg.dev
ARTIFACT_REGISTRY_REPOSITORY=helm-chart-tests
INFRA_PROJECT_ID=marble-infra
ACCOUNT=franck-test-service-acc@tokyo-country-381508.iam.gserviceaccount.com
SERVICE_ACCOUNT_NAME=franck-test-service-acc@tokyo-country-381508.iam.gserviceaccount.com
CHART_VERSION=0.2.0
CHART_NAME=marble-application
CHART_NAME=marble-application

0 comments on commit da2974b

Please sign in to comment.