fix:https routing and pr creation.

This commit is contained in:
Nirmal Arya 2025-06-16 22:07:14 -04:00
parent 4ce1a51d8a
commit 96a9a05c79
2 changed files with 13 additions and 2 deletions

View File

@ -7,6 +7,12 @@ on:
paths-ignore:
- 'k8s/**'
workflow_dispatch: # Allows manual triggering
inputs:
create_deployment_pr:
description: 'Create PR for Kubernetes deployment update'
required: false
default: 'true'
type: boolean
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
@ -176,7 +182,7 @@ jobs:
# Create PR for Kubernetes manifests update (for main and dev branches)
- name: Create PR for Kubernetes updates
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev'
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || (github.event_name == 'workflow_dispatch' && github.event.inputs.create_deployment_pr == 'true')
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |

View File

@ -78,7 +78,12 @@ export async function action({ request, context }: ActionFunctionArgs) {
// Get the callback URL
const url = new URL(request.url);
const callbackUrl = `${url.origin}/auth/callback`;
// In production with ingress/load balancer, force HTTPS for callback URL
let callbackUrl = `${url.origin}/auth/callback`;
if (url.hostname.includes('phexhub-np.int.bayer.com')) {
callbackUrl = `https://${url.hostname}/auth/callback`;
}
// Generate authorization URL
const { url: authorizationUrl } = getAuthorizationUrl(state, callbackUrl, context);