diff --git a/.github/workflows/ppr-ui-cd.yml b/.github/workflows/ppr-ui-cd.yml index d5deb2129..d41e4ed3a 100644 --- a/.github/workflows/ppr-ui-cd.yml +++ b/.github/workflows/ppr-ui-cd.yml @@ -8,7 +8,7 @@ on: - "ppr-ui/**" workflow_dispatch: inputs: - environment: + target: description: "Environment" required: true type: choice @@ -24,12 +24,11 @@ on: jobs: ppr-ui-cd: - uses: bcgov/bcregistry-sre/.github/workflows/ui-cd-node20.yaml@main + uses: bcgov/bcregistry-sre/.github/workflows/frontend-cd.yaml@main with: - environment: ${{ inputs.environment }} - tagname: ${{ inputs.tagname }} + target: ${{ inputs.target }} + app_name: "assets-ui" working_directory: "./ppr-ui" secrets: - APP_NAME: "assets-ui" - 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 }} diff --git a/.github/workflows/ppr-ui-ci.yml b/.github/workflows/ppr-ui-ci.yml index 7daa0206e..4b56e3f11 100644 --- a/.github/workflows/ppr-ui-ci.yml +++ b/.github/workflows/ppr-ui-ci.yml @@ -13,73 +13,9 @@ defaults: working-directory: ./ppr-ui jobs: - setup-job: - runs-on: ubuntu-20.04 - - if: github.repository == 'bcgov/ppr' - - steps: - - uses: actions/checkout@v3 - - run: "true" - - linting: - needs: setup-job - runs-on: ubuntu-20.04 - - strategy: - matrix: - node-version: [20.5.1] - - steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - name: Install dependencies - run: | - make setup - - name: Linting - run: | - make lint - - testing-coverage: - needs: setup-job - runs-on: ubuntu-20.04 - - strategy: - matrix: - node-version: [20.5.1] - - steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - name: Install dependencies - run: | - make setup - - name: Test with Jest - id: test - run: | - make test - env: - PPR_API_KEY: ${{ secrets.PPR_API_KEY }} - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 - with: - flags: pprui - name: codecov-ppr-ui - fail_ci_if_error: false - - build-check: - needs: setup-job - runs-on: ubuntu-20.04 - - steps: - - uses: actions/checkout@v3 - - name: build to check strictness - id: build - run: | - make build-nc + ppr-ui-ci: + uses: bcgov/bcregistry-sre/.github/workflows/frontend-ci.yaml@main + with: + app_name: "ppr-ui" + working_directory: "./ppr-ui" + codecov_flag: "pprui"