fix: pipeline and helm release #13
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PR | ||
on: | ||
pull_request: | ||
merge_group: | ||
concurrency: | ||
# Cancel in progress for PR open and close, but not merge_group | ||
group: ${{ github.workflow }}-${{ github.event.number || github.event.merge_group.base_sha }} | ||
cancel-in-progress: true | ||
jobs: | ||
builds: | ||
name: Builds | ||
if: '!github.event.pull_request.head.repo.fork' | ||
runs-on: ubuntu-22.04 | ||
permissions: | ||
packages: write | ||
strategy: | ||
matrix: | ||
package: [nr-oracle-service, nr-oracle-service-init] | ||
include: | ||
- package: nr-oracle-service | ||
build_file: Dockerfile | ||
build_context: . | ||
triggers: ('src/' 'pom.xml') | ||
- package: nr-oracle-service-init | ||
build_file: Dockerfile.certs | ||
build_context: . | ||
triggers: ('get_certs.sh' 'Dockerfile.certs') | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: bcgov-nr/action-builder-ghcr@v2.0.1 | ||
with: | ||
package: ${{ matrix.package }} | ||
tag: ${{ github.event.number }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
build_file: ${{ matrix.build_file }} | ||
build_context: ${{ matrix.build_context }} | ||
triggers: ${{ matrix.triggers }} | ||
secrets: | ||
name: Fetch Secrets | ||
needs: | ||
- builds | ||
runs-on: ubuntu-22.04 | ||
environment: test | ||
outputs: | ||
DB_HOST: ${{ steps.secrets.outputs.DB_HOST }} | ||
DB_NAME: ${{ steps.secrets.outputs.DB_NAME }} | ||
DB_PWD: ${{ steps.secrets.outputs.DB_PWD }} | ||
DB_USER: ${{ steps.secrets.outputs.DB_USER }} | ||
env: | ||
project_name: nr-oracle | ||
app_name: nr-oracle-service | ||
environment: development | ||
secret_path_env: dev # this path is different from the path in the broker | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Broker | ||
id: broker | ||
uses: bcgov-nr/action-vault-broker-approle@v1.1.0 | ||
with: | ||
broker_jwt: ${{ secrets.BROKER_JWT }} | ||
provision_role_id: ${{ secrets.PROVISION_ROLE }} | ||
project_name: ${{ env.project_name }} | ||
app_name: ${{ env.app_name }} | ||
environment: ${{ env.environment }} | ||
- name: Import Secrets | ||
id: secrets | ||
uses: hashicorp/vault-action@v2.7.5 | ||
with: | ||
url: https://vault-iit.apps.silver.devops.gov.bc.ca | ||
token: ${{ steps.broker.outputs.vault_token }} | ||
exportEnv: 'false' | ||
secrets: | | ||
apps/data/${{ env.secret_path_env }}/${{ env.project_name }}/${{ env.app_name }}/rar dbHost | DB_HOST; | ||
apps/data/${{ env.secret_path_env }}/${{ env.project_name }}/${{ env.app_name }}/rar dbName | DB_NAME; | ||
apps/data/${{ env.secret_path_env }}/${{ env.project_name }}/${{ env.app_name }}/rar dbPassword | DB_PWD; | ||
apps/data/${{ env.secret_path_env }}/${{ env.project_name }}/${{ env.app_name }}/rar dbUser | DB_USER; | ||
deploys: | ||
name: Deploys | ||
uses: ./.github/workflows/.deploy.yml | ||
needs: [secrets] | ||
secrets: inherit | ||
with: | ||
DB_HOST: ${{ steps.secrets.outputs.DB_HOST }} | ||
Check failure on line 92 in .github/workflows/pr-open.yml GitHub Actions / PRInvalid workflow file
|
||
DB_NAME: ${{ steps.secrets.outputs.DB_NAME }} | ||
DB_PWD: ${{ steps.secrets.outputs.DB_PWD }} | ||
DB_USER: ${{ steps.secrets.outputs.DB_USER }} | ||
DB_PORT: ${{ secrets.DB_PORT }} |