feat: [TASK-89,TASK-130] Dev/vue component module lib #202
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: Commit Stage ๐ค | |
on: | |
push: | |
branches: [ feature/*, develop ] | |
pull_request: | |
branches: [ main, develop ] | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
VERSION: ${{ github.sha }} | |
CI: CI | |
NATIVE_IMAGE_ENABLED: enabled | |
CI_GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }} | |
DOCKER_CI_GITHUB_TOKEN: ${{ secrets.DOCKER_CI_GITHUB_TOKEN }} | |
OWNER: ${{ github.repository_owner }} | |
DEPLOY_REPO: ${{ github.event.repository.name }} | |
permissions: | |
packages: write | |
contents: write | |
issues: write | |
pull-requests: write | |
jobs: | |
validation: | |
name: Validation ๐ | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Check Project Integrity | |
uses: ./.github/actions/analysis/check | |
build: | |
name: Build and Test ๐งช | |
needs: [ validation ] | |
runs-on: ubuntu-latest | |
permissions: | |
actions: read | |
contents: read | |
security-events: write | |
steps: | |
- name: ๐ CI_GITHUB_TOKEN | |
if: env.CI_GITHUB_TOKEN == '' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: echo "CI_GITHUB_TOKEN=${GITHUB_TOKEN}" >> $GITHUB_ENV | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
- name: Install Java Tools & Dependencies | |
uses: ./.github/actions/install/java | |
with: | |
java-version: 21 | |
gradle-arguments: build --scan --no-daemon --stacktrace | |
github_token: ${{ env.CI_GITHUB_TOKEN }} | |
- name: Source code vulnerability scanning | |
uses: aquasecurity/trivy-action@master | |
with: | |
scan-type: 'fs' | |
format: 'sarif' | |
output: 'trivy-results-source-code.sarif' | |
- name: Upload vulnerability report | |
uses: github/codeql-action/upload-sarif@v3 | |
if: success() || failure() | |
with: | |
sarif_file: 'trivy-results-source-code.sarif' | |
category: source-code | |
code-coverage: | |
name: Code Coverage ๐ | |
needs: [ build ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ env.CI_GITHUB_TOKEN }} | |
- name: Install Java Tools & Dependencies | |
uses: ./.github/actions/install/java | |
- name: Install Tools & Dependencies | |
uses: ./.github/actions/install/node | |
- name: Run Code Coverage | |
run: | | |
./gradlew koverXmlReport --no-daemon --stacktrace | |
- name: Upload coverage reports | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: build/reports/kover/report.xml | |
fail_ci_if_error: true # optional (default = false) | |
verbose: true # optional (default = false) | |
static-analysis-security: | |
name: ๐ฎ Static analysis and ๐Security Checks | |
needs: [ validation ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: ๐ Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Static Analysis Security | |
uses: ./.github/actions/analysis/security | |
package: | |
name: Package and Publish ๐ฆ | |
needs: [ build ] | |
runs-on: ubuntu-latest | |
permissions: write-all | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
- name: Package docker image | |
uses: ./.github/actions/docker | |
with: | |
deliver: false | |
registry: ${{ env.REGISTRY }} | |
image_name: ${{ env.IMAGE_NAME }} | |
version: ${{ github.sha }} | |
ci_github_token: ${{ env.DOCKER_CI_GITHUB_TOKEN }} | |
owner: ${{ env.OWNER }} | |
app_repo: ${{ github.repository }} | |
deploy_repo: ${{ env.DEPLOY_REPO }} | |
docker_username: ${{ secrets.DOCKER_USERNAME }} | |
docker_password: ${{ secrets.DOCKER_PASSWORD }} |