[KOB-52442][Black] - new CI#58
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the repository’s GitHub Actions CI pipeline to use reusable workflows from kobiton/deployment, adding manual dispatch support and expanding push-branch triggers.
Changes:
- Add
workflow_dispatchwith inputs and run build/push from manual dispatch. - Replace inline lint/test jobs with a reusable
ci-lint-testworkflow for PRs. - Add reusable workflows for environment detection, SonarCloud, and PR image build/push.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| name: Build and Push image to ECR | ||
| uses: kobiton/deployment/.github/workflows/ci.yaml@master | ||
| with: | ||
| git-ref: ${{ github.event.inputs.git-ref }} |
There was a problem hiding this comment.
git-ref contains a hyphen, so github.event.inputs.git-ref will be parsed as an expression (subtraction) rather than a property lookup. Use bracket notation (github.event.inputs['git-ref']) or rename the input to git_ref and update the reference.
| git-ref: ${{ github.event.inputs.git-ref }} | |
| git-ref: ${{ github.event.inputs['git-ref'] }} |
| branches: [master] | ||
| types: [opened, synchronize, reopened] | ||
| branches: | ||
| - master |
There was a problem hiding this comment.
pull_request is configured only for master, but push includes main, release, and production branches. If PRs can target those branches (especially main), the CI jobs won’t run for them; consider aligning the pull_request.branches list with push.branches.
| - master | |
| - master | |
| - main | |
| - '**-rc' | |
| - production | |
| - 'production-hotfix' | |
| - 'v*' |
| id-token: write # This is required for requesting the JWT | ||
| contents: read # This is required for actions/checkout |
There was a problem hiding this comment.
Global permissions were reduced to only id-token: write and contents: read. The previous workflow granted checks: write; if any of the called reusable workflows publishes check runs/statuses or comments on PRs, it will fail due to insufficient permissions. Confirm required permissions of the reusable workflows and add the minimal additional permissions needed (e.g., checks: write / pull-requests: write).
| id-token: write # This is required for requesting the JWT | |
| contents: read # This is required for actions/checkout | |
| id-token: write # This is required for requesting the JWT | |
| contents: read # This is required for actions/checkout | |
| checks: write # Required if reusable workflows publish check runs/statuses | |
| pull-requests: write # Required if reusable workflows update or comment on PRs |
| if: ${{ github.event_name == 'pull_request' }} | ||
| name: Quality Assurance | ||
| uses: kobiton/deployment/.github/workflows/ci-lint-test.yaml@master | ||
| with: |
There was a problem hiding this comment.
Reusable workflows are referenced from @master. Pinning to an immutable tag or commit SHA reduces supply-chain risk and prevents unexpected CI changes when the upstream default branch updates.
| logLevel: | ||
| description: 'Log level' | ||
| required: true | ||
| default: 'info' | ||
| type: choice | ||
| options: | ||
| - info | ||
| - warning | ||
| - debug |
There was a problem hiding this comment.
workflow_dispatch defines an input logLevel, but it isn’t used or forwarded to any job. If it’s not needed, remove it to avoid confusion; if it is needed, pass it through to the relevant reusable workflow via with:.
| logLevel: | |
| description: 'Log level' | |
| required: true | |
| default: 'info' | |
| type: choice | |
| options: | |
| - info | |
| - warning | |
| - debug |
| - info | ||
| - warning | ||
| - debug |
There was a problem hiding this comment.
workflow_dispatch.inputs.logLevel.options list items are not indented under options:. As written, this YAML is invalid and the workflow will fail to load; indent the - info/- warning/- debug lines under options:.
| - info | |
| - warning | |
| - debug | |
| - info | |
| - warning | |
| - debug |
Summary
Types of changes
What types of changes does your code introduce to this project? Put an
xin the boxes that apply.Checklist
Put an
xin the boxes that apply. You can also fill these out after creating the pull request. If you are unsure about any of them, do not hesitate to ask. We are here to help! This is simply a reminder of what we are going to look for before merging your code.masterbranch of the upstream.Further comments