diff --git a/.github/workflows/prod.yml b/.github/workflows/prod.yml index 0f43a0d..ec2d5d2 100644 --- a/.github/workflows/prod.yml +++ b/.github/workflows/prod.yml @@ -2,6 +2,9 @@ name: Prod on: + push: + branches: + - ch-update-deployments release: types: - released @@ -14,6 +17,8 @@ jobs: tag: ${{ steps.export.outputs.tag }} runs-on: ubuntu-latest + env: + image: cranecloud/database-api steps: - name: Checkout @@ -22,21 +27,13 @@ jobs: ref: master # reference branch - name: Install (Buildx) - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@v1 - - name: Login (GCP) - uses: google-github-actions/auth@v2 + - name: Login to Docker Hub + uses: docker/login-action@v2 with: - credentials_json: ${{ secrets.CREDENTIALS_JSON }} - - - name: Install (Gcloud) - uses: google-github-actions/setup-gcloud@v1 - with: - project_id: crane-cloud-274413 - install_components: "gke-gcloud-auth-plugin" - - - name: Login (GCR) - run: gcloud auth configure-docker + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - id: meta name: Tag @@ -44,7 +41,7 @@ jobs: with: flavor: | latest=true - images: gcr.io/crane-cloud-274413/database-api + images: ${{ env.image }} tags: | type=ref,event=branch type=ref,event=pr @@ -90,8 +87,8 @@ jobs: namespace: cranecloud-prod steps: - - name: Clone - uses: actions/checkout@v2 + - name: Checkout code + uses: actions/checkout@v4 - name: Login (GCP) uses: google-github-actions/auth@v2 @@ -99,13 +96,13 @@ jobs: credentials_json: ${{ secrets.CREDENTIALS_JSON }} - name: Install (Gcloud) - uses: google-github-actions/setup-gcloud@v1 + uses: google-github-actions/setup-gcloud@v2 with: project_id: crane-cloud-274413 install_components: "gke-gcloud-auth-plugin" - name: Login (Kubernetes Cluster) - uses: google-github-actions/get-gke-credentials@v1 + uses: google-github-actions/get-gke-credentials@v2 with: cluster_name: staging-cluster location: us-central1-a diff --git a/helm/values.prod.yaml b/helm/values.prod.yaml index b79b023..cf895c7 100644 --- a/helm/values.prod.yaml +++ b/helm/values.prod.yaml @@ -1,7 +1,7 @@ replicaCount: 1 image: - repository: gcr.io/crane-cloud-274413/database-api + repository: cranecloud/database-api pullPolicy: Always tag: ${{ DOCKER_IMAGE_TAG }}