Running CI/CD on Arshadul-Monir's commits #4931
Workflow file for this run
This file contains hidden or 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: CI/CD | |
| run-name: Running CI/CD on ${{ github.actor }}'s commits | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| checks: write | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| backendPreTest: | |
| name: Backend Pre Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Run workflow | |
| uses: ./.github/composite/test/backend-pre-test | |
| e2ePreTest: | |
| name: E2E Pre Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Set up pnpm | |
| uses: pnpm/action-setup@master | |
| with: | |
| version: 10.24.0 | |
| cache: true | |
| cache_dependency_path: js/pnpm-lock.yaml | |
| package_json_file: js/package.json | |
| - name: Run pre test | |
| shell: bash | |
| run: cd e2e && pnpm i && pnpm run test | |
| backendTests: | |
| name: Backend Tests | |
| runs-on: ubuntu-latest | |
| needs: backendPreTest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Run workflow | |
| uses: ./.github/composite/test/backend-test | |
| with: | |
| GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | |
| GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
| frontendTests: | |
| name: Frontend Tests | |
| runs-on: ubuntu-latest | |
| needs: backendPreTest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Run workflow | |
| uses: ./.github/composite/test/frontend-test | |
| with: | |
| GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | |
| GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
| testBuildImage: | |
| name: Build Test Docker Image | |
| runs-on: ubuntu-latest | |
| needs: backendPreTest | |
| if: github.ref_name != 'main' | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Run workflow | |
| uses: ./.github/composite/build-image | |
| with: | |
| GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | |
| GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
| TAG_PREFIX: test- | |
| DOCKER_UPLOAD: false | |
| testBuildStandupBotImage: | |
| name: Build Test Docker Image for codebloom-standup-bot | |
| runs-on: ubuntu-latest | |
| if: github.ref_name != 'main' | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Run workflow | |
| uses: ./.github/composite/build-image/internal/standup-bot | |
| with: | |
| GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | |
| GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
| DOCKER_UPLOAD: false | |
| validateDBSchema: | |
| name: Validate DB Schema on Prod DB | |
| runs-on: ubuntu-latest | |
| needs: backendPreTest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Run workflow | |
| uses: ./.github/composite/validate-db | |
| with: | |
| GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | |
| GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
| buildImage: | |
| name: Build Docker Image & Upload to Registry | |
| runs-on: ubuntu-latest | |
| needs: [validateDBSchema, backendTests, frontendTests] | |
| if: github.ref_name == 'main' | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Run workflow | |
| uses: ./.github/composite/build-image | |
| with: | |
| GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | |
| GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
| buildStandupBotImage: | |
| name: Build codebloom-standup-bot Docker Image & Upload to Registry | |
| runs-on: ubuntu-latest | |
| if: github.ref_name == 'main' | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Run workflow | |
| uses: ./.github/composite/build-image/internal/standup-bot | |
| with: | |
| GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | |
| GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
| redeploy: | |
| name: Redeploy on DigitalOcean | |
| runs-on: ubuntu-latest | |
| needs: buildImage | |
| environment: production | |
| if: github.ref_name == 'main' | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Run workflow | |
| uses: ./.github/composite/redeploy | |
| with: | |
| GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | |
| GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
| redeployStandupBot: | |
| name: Redeploy codebloom-standup-bot on Coolify | |
| runs-on: ubuntu-latest | |
| needs: buildStandupBotImage | |
| environment: production | |
| if: github.ref_name == 'main' | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Run workflow | |
| uses: ./.github/composite/redeploy/internal/standup-bot | |
| with: | |
| GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | |
| GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} |