From d30ed1a18f0c0cd2b68334edabc8e4569a3f251c Mon Sep 17 00:00:00 2001 From: zskhan Date: Thu, 28 May 2026 18:04:39 +0200 Subject: [PATCH] chore: remove unused precommit.yml workflow --- .github/workflows/precommit.yml | 130 -------------------------------- 1 file changed, 130 deletions(-) delete mode 100644 .github/workflows/precommit.yml diff --git a/.github/workflows/precommit.yml b/.github/workflows/precommit.yml deleted file mode 100644 index 7a03090a3f4..00000000000 --- a/.github/workflows/precommit.yml +++ /dev/null @@ -1,130 +0,0 @@ -name: precommit - -#on: -# pull_request: -# # we want to run the CI on every PR targetting those branches -# branches: [dev] - -concurrency: - group: precommit-deploy - cancel-in-progress: true - -jobs: - build: - runs-on: ubuntu-24.04 - - outputs: - unit_tests_report: ${{ env.UNIT_TEST_REPORT_FILE }} - build_artifact: ${{ env.BUILD_ARTIFACT }} - total_additions: ${{ steps.check_additions.outputs.total_additions }} - - env: - BUILD_DIR: apps/server/dist/s3/ - BUILD_ARTIFACT: ebs.zip - COMMIT_URL: ${{github.event.head_commit.url}} - COMMITTER: ${{github.event.head_commit.committer.name}} - CHANGELOG_FILE: './changelog.md' - UNIT_TEST_REPORT_FILE: './unit-tests.log' - - steps: - - name: Checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - with: - persist-credentials: false - fetch-depth: 0 - ref: ${{ github.event.pull_request.head.sha }} - - - name: Setup Node.js - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f - with: - node-version-file: '.nvmrc' - cache: 'yarn' - - - name: Install JS dependencies - run: yarn --immutable - - - name: Update configuration - run: yarn nx run webapp:configure - - - name: Build and package - run: yarn nx run server:package - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a - with: - name: 'build-artifact' - path: '${{env.BUILD_DIR}}${{env.BUILD_ARTIFACT}}' - - - name: Check total PR additions - id: check_additions - run: | - total_additions=$(gh api -H "Accept: application/vnd.github.v3+json" \ - "repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}" \ - | jq -r '.additions') - if [ -z "$total_additions" ] || [ "$total_additions" = "null" ]; then - echo "Error: Could not extract additions" - exit 1 - fi - echo "Found total additions: $total_additions" - echo "total_additions=$total_additions" >> $GITHUB_OUTPUT - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - deploy_to_aws: - name: 'Deploy to live environments' - runs-on: ubuntu-24.04 - env: - AWS_REGION: eu-central-1 - needs: [build] - - steps: - - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c - with: - name: 'build-artifact' - - - name: Check if deploy is necessary - id: check_deploy - if: ${{ always() }} - run: | - if [[ ${{ needs.build.outputs.total_additions }} -le 100 || "${{ github.actor }}" == "renovate[bot]" ]]; then - echo "Skipping deployment" - exit 0 - fi - - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@ec61189d14ec14c8efccab744f656cffd0e33f37 - with: - aws-access-key-id: ${{ secrets.WEBTEAM_AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.WEBTEAM_AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ env.AWS_REGION }} - - - name: Deploy to precommit environment - id: deploy - uses: aws-actions/aws-elasticbeanstalk-deploy@1f56e4e813ae4eb167e69ca324234c336c1df573 - with: - aws-region: ${{ env.AWS_REGION }} - application-name: Webapp - environment-name: wire-webapp-precommit - version-label: ${{ github.run_id }} - deployment-package-path: ${{ needs.build.outputs.build_artifact }} - wait-for-deployment: true - wait-for-environment-recovery: true - deployment-timeout: 150 - use-existing-application-version-if-available: true - - - name: Deployment Status - if: ${{ always() }} - run: | - if [[ "${{ steps.deploy.outcome }}" == "success" ]]; then - echo "✅ Deployment completed successfully" - elif [[ "${{ steps.deploy.outcome }}" == "skipped" ]]; then - if [[ "${{ needs.build.outputs.total_additions }}" -le 100 ]]; then - echo "⏭️ Deployment was skipped: PR has ${{ needs.build.outputs.total_additions }} additions (threshold: 100)" - elif [[ "${{ github.actor }}" == "renovate[bot]" ]]; then - echo "⏭️ Deployment was skipped: PR is from renovate" - else - echo "⏭️ Deployment was skipped" - fi - else - echo "❌ Deployment failed" - exit 1 - fi