Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 0 additions & 51 deletions .github/workflows/.deployer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,28 +49,6 @@ on:
description: Paths used to trigger a deployment; e.g. ('./backend/' './frontend/)
required: false
type: string

### Crunchy
crunchy_values_file:
description: 'Path to the values.yml file to use for the deployment'
required: false
type: string
s3_access_key:
description: 'S3 access key'
required: false
type: string
s3_secret_key:
description: 'S3 secret key'
required: false
type: string
s3_bucket:
description: 'S3 bucket'
required: false
type: string
s3_endpoint:
description: 'S3 endpoint'
required: false
type: string

### Usually a bad idea / not recommended
repository:
Expand Down Expand Up @@ -105,37 +83,8 @@ on:
permissions: {}

jobs:
deployer-db:
name: Database
if: inputs.crunchy_values_file
runs-on: ubuntu-24.04
steps:
- name: Deploy Crunchy
uses: bcgov/action-crunchy@v1.1.0
with:
oc_namespace: ${{ secrets.oc_namespace }}
oc_token: ${{ secrets.oc_token }}
oc_server: ${{ inputs.oc_server }}
environment: ${{ inputs.environment }}
s3_access_key: ${{ secrets.s3_access_key }}
s3_secret_key: ${{ secrets.s3_secret_key }}
s3_bucket: ${{ secrets.s3_bucket }}
s3_endpoint: ${{ secrets.s3_endpoint }}
triggers: ${{ inputs.triggers }}
values_file: ${{ inputs.crunchy_values_file }}

# deployer-db:
# name: Database
# if: inputs.crunchy == 'true'
# uses: ./.github/workflows/.deployer-db.yml
# secrets:
# with:
# environment: ${{ inputs.environment }}
# triggers: ${{ inputs.triggers }}

deploy:
name: Helm
needs: deployer-db
environment: ${{ inputs.environment }}
runs-on: ubuntu-24.04
outputs:
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,24 @@
cancel-in-progress: false

jobs:
deploy-db:
name: Stack
environment: ${{ inputs.environment }}
runs-on: ubuntu-24.04
outputs:
tag: ${{ inputs.tag || steps.pr.outputs.pr }}
triggered: ${{ steps.deploy.outputs.triggered }}
steps:
- uses: bcgov/action-crunchy@v1.1.0
name: Deploy Crunchy
id: deploy_crunchy
with:
environment: test
oc_namespace: ${{ secrets.oc_namespace }}
oc_token: ${{ secrets.oc_token }}
values_file: crunchy/values.yml

deploy-test:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
name: Deploy (test)
uses: ./.github/workflows/.deployer.yml
secrets:
Expand Down
19 changes: 17 additions & 2 deletions .github/workflows/pr-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,31 @@
exit 1
fi

deploy-db:
name: Stack
environment: ${{ inputs.environment }}
runs-on: ubuntu-24.04
outputs:
tag: ${{ inputs.tag || steps.pr.outputs.pr }}
triggered: ${{ steps.deploy.outputs.triggered }}
steps:
- uses: bcgov/action-crunchy@v1.1.0
name: Deploy Crunchy
id: deploy_crunchy
with:
oc_namespace: ${{ secrets.oc_namespace }}
oc_token: ${{ secrets.oc_token }}
values_file: crunchy/values.yml

deploys:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
name: Deploys
needs: [builds]
needs: [builds, deploy-db]
uses: ./.github/workflows/.deployer.yml
secrets:
oc_namespace: ${{ secrets.oc_namespace }}
oc_token: ${{ secrets.oc_token }}
with:
atomic: false
crunchy_values_file: crunchy/values.yml
promote_images: backend frontend migrations
promote_tags: pr
repository: bcgov/quickstart-openshift
Expand Down