Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): builds in workflow_dispatch #11

Merged
merged 8 commits into from
Feb 29, 2024
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
31 changes: 31 additions & 0 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build Packages

on:
workflow_dispatch:
inputs:
tag:
description: 'Specify a tag to build; defaults to latest'
default: latest
type: string

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true

jobs:
# https://github.com/bcgov-nr/action-builder-ghcr
builds:
name: Builds
runs-on: ubuntu-22.04
strategy:
matrix:
package: [migrations, backend, frontend]
timeout-minutes: 10
steps:
- uses: bcgov-nr/action-builder-ghcr@v2.0.2
id: builds
with:
keep_versions: 50
package: ${{ matrix.package }}
repository: bcgov/quickstart-openshift
tag: ${{ inputs.tag }}
2 changes: 1 addition & 1 deletion .github/workflows/pr-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
with:
keep_versions: 50
package: ${{ matrix.package }}
repository: bcgov/quickstart-openshift
tag: ${{ github.event.number }}
tag_fallback: latest
triggers: ('${{ matrix.package }}/')

deploys:
name: Deploys
Expand Down
13 changes: 1 addition & 12 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ inputs:
description: Cleanup, too aggressive for higher level environments
default: false
required: false
development:
description: Development environment? Adds pvc cleanup; [true|false]
default: false
required: false
directory:
description: Chart directory
default: 'charts/${{ github.event.repository.name }}'
Expand Down Expand Up @@ -126,20 +122,13 @@ runs:
helm uninstall ${{ steps.vars.outputs.repo_release }}
fi

# Development=true removes Bitnami pvc, which existing up jobs, but causes downtime
- if: inputs.development == 'true'
shell: bash
run: |
# Delete Bitnami PVC before deployment
oc delete pvc data-${{ steps.vars.outputs.repo_release }}-bitnami-pg-0 || true

# Package Helm chart
- uses: actions/checkout@v4
- shell: bash
working-directory: ${{ inputs.directory }}
run: |
# Package Helm chart
helm package -u . --app-version="${{ steps.vars.outputs.tag }}" --version=${{ steps.vars.outputs.tag }}
helm package -u . --app-version="${{ steps.vars.outputs.tag }}" --version=${{ steps.pr.outputs.pr }}

# Deploy Helm chart
- shell: bash
Expand Down
Loading