diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index bd3d792..b3460f3 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -6,8 +6,8 @@ on: - main workflow_dispatch: inputs: - environment: - description: "Environment" + target: + description: "Deploy To" required: true type: choice options: @@ -15,18 +15,14 @@ on: - test - sandbox - prod - tagname: - description: "Specify a previous version (git tag) to deploy" - required: false - default: "" jobs: bcregistry-ui-cd: - uses: bcgov/bcregistry-sre/.github/workflows/ui-cd.yaml@main + uses: bcgov/bcregistry-sre/.github/workflows/frontend-cd.yaml@main with: - environment: ${{ inputs.environment }} - tagname: ${{ inputs.tagname }} + target: ${{ inputs.target }} + app_name: "bcregistry" + working_directory: "." secrets: - APP_NAME: bcregistry - OP_CONNECT_URL: ${{ secrets.OP_CONNECT_URL }} - OP_CONNECT_TOKEN: ${{ secrets.OP_CONNECT_TOKEN }} + WORKLOAD_IDENTIFY_POOLS_PROVIDER: ${{ secrets.WORKLOAD_IDENTIFY_POOLS_PROVIDER }} + GCP_SERVICE_ACCOUNT: ${{ secrets.GCP_SERVICE_ACCOUNT }} \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4fb90f6..5f2bc31 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,88 +2,12 @@ name: BCREGISTRY UI CI on: pull_request: - types: [assigned, synchronize] - -defaults: - run: - shell: bash + workflow_dispatch: jobs: - setup-job: - runs-on: ubuntu-20.04 - - if: github.repository == 'bcgov/bcregistry' - - steps: - - uses: actions/checkout@v3 - - run: "true" - - linting: - needs: setup-job - runs-on: ubuntu-20.04 - - strategy: - matrix: - node-version: [16.14.2] - - steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - - name: Install dependencies - run: | - npm ci - - name: Linting - run: | - npm run lint - - testing-coverage: - needs: setup-job - runs-on: ubuntu-20.04 - - strategy: - matrix: - node-version: [16.14.2] - - steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - - name: Install dependencies - run: | - npm ci - - name: Test with Jest - id: test - run: | - npm run test - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 - with: - name: codecov-bcregistry - fail_ci_if_error: true - - build-check: - needs: setup-job - runs-on: ubuntu-20.04 - - strategy: - matrix: - node-version: [16.14.2] - - steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - - name: Install dependencies - run: | - npm ci - - name: build - id: build - run: | - npm run build \ No newline at end of file + bcregistry-ui-ci: + uses: pwei1018/bcregistry-sre/.github/workflows/frontend-ci.yaml@main + with: + app_name: "bcregistry" + working_directory: "." + codecov_flag: "" \ No newline at end of file diff --git a/package.json b/package.json index 43a5fc8..4f7ac2f 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "scripts": { "dev": "nuxt", "build": "nuxt generate", + "build-check": "nuxt build", "start": "nuxt start", "generate": "nuxt generate", "lint:js": "eslint --ext \".js,.vue\" --ignore-path .gitignore .",