diff --git a/.github/workflows/build_packages.yml b/.github/workflows/build_packages.yml index dc4e414b2a..ee0b3b1393 100644 --- a/.github/workflows/build_packages.yml +++ b/.github/workflows/build_packages.yml @@ -6,6 +6,7 @@ on: - 'release/**' - 'hotfix/**' - 'develop' + - 'feature/test-build' paths: - '.github/workflows/build_packages.yml' workflow_dispatch: @@ -29,7 +30,7 @@ on: rpm_build: description: 'Trigger RPM build' required: false - default: 'false' + default: 'true' concurrency: group: ${{ github.ref }} @@ -40,27 +41,27 @@ env: PRODUCT_LOW: "docspace" BUILD_NUMBER: ${{ github.run_number }} PACKAGE_DIRECTORY: "/home/runner/work/${{ github.event.repository.name }}/${{ github.event.repository.name }}" - BRANCH_BUILDTOOLS: ${{ github.event.inputs.branch-buildtools != '' && github.event.inputs.branch-buildtools || github.ref_name || 'develop' }} - BRANCH_CLIENT: ${{ github.event.inputs.branch-client != '' && github.event.inputs.branch-client || github.ref_name || 'develop' }} - BRANCH_SERVER: ${{ github.event.inputs.branch-server != '' && github.event.inputs.branch-server || github.ref_name || 'develop' }} + BRANCH_BUILDTOOLS: 'develop' + BRANCH_CLIENT: 'develop' + BRANCH_SERVER: 'develop' jobs: prepare: runs-on: ubuntu-22.04 outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} - build_all: ${{ steps.changes.outputs.build_all }} + # build_all: ${{ steps.changes.outputs.build_all }} steps: - name: Checkout code uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Determine changed - id: changes - run: | - git fetch --no-tags --prune --depth=2 - echo "build_all=$(git diff --name-only HEAD~1 HEAD | grep -qE 'build_packages.yml' && echo true)" >> $GITHUB_OUTPUT + # - name: Determine changed + # id: changes + # run: | + # git fetch --no-tags --prune --depth=2 + # echo "build_all=$(git diff --name-only HEAD~1 HEAD | grep -qE 'build_packages.yml' && echo true)" >> $GITHUB_OUTPUT - name: Set matrix id: set-matrix run: | @@ -68,8 +69,8 @@ jobs: if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then [[ "${{ github.event.inputs.deb_build }}" == "true" ]] && package_types+=("deb") [[ "${{ github.event.inputs.rpm_build }}" == "true" ]] && package_types+=("rpm") - elif [[ "${{ steps.changes.outputs.build_all }}" == "true" ]]; then - package_types+=("deb" "rpm") + # elif [[ "${{ steps.changes.outputs.build_all }}" == "true" ]]; then + # package_types+=("deb" "rpm") else [[ "${{ github.event.inputs.deb_build }}" == "true" ]] && package_types+=("deb") [[ "${{ github.event.inputs.rpm_build }}" == "true" ]] && package_types+=("rpm") @@ -219,27 +220,27 @@ jobs: echo "::warning Noticerpm=rpmlint::$(cat RPM_LINT | awk '/W:/ { ws += 1 } /E:/ { es += 1 } END { print "Warnings:", ws, "Errors:", es }')" fi - trigger_oci: - name: Trigger ci-oci-install Workflow - needs: [prepare, build] - runs-on: ubuntu-22.04 - if: ${{ success() }} - steps: - - name: Trigger CI-OCI-Install Workflow - run: | - deb_build="${{ github.event.inputs.deb_build }}" - rpm_build="${{ github.event.inputs.rpm_build }}" - [[ "${{ needs.prepare.outputs.build_all }}" == "true" ]] && deb_build="true" && rpm_build="true" - curl \ - -X POST \ - -u "${{ secrets.USERNAME}}:${{secrets.TOKEN}}" \ - https://api.github.com/repos/ONLYOFFICE/DocSpace-buildtools/actions/workflows/85067971/dispatches \ - -H "Accept: application/vnd.github.everest-preview+json" \ - --data '{ - "ref": "'"${{ github.ref_name }}"'", - "inputs": { - "deb_build": "'"${deb_build}"'", - "rpm_build": "'"${rpm_build}"'" - } - }' + # trigger_oci: + # name: Trigger ci-oci-install Workflow + # needs: [prepare, build] + # runs-on: ubuntu-22.04 + # if: ${{ success() }} + # steps: + # - name: Trigger CI-OCI-Install Workflow + # run: | + # deb_build="${{ github.event.inputs.deb_build }}" + # rpm_build="${{ github.event.inputs.rpm_build }}" + # [[ "${{ needs.prepare.outputs.build_all }}" == "true" ]] && deb_build="true" && rpm_build="true" + # curl \ + # -X POST \ + # -u "${{ secrets.USERNAME}}:${{secrets.TOKEN}}" \ + # https://api.github.com/repos/ONLYOFFICE/DocSpace-buildtools/actions/workflows/85067971/dispatches \ + # -H "Accept: application/vnd.github.everest-preview+json" \ + # --data '{ + # "ref": "'"${{ github.ref_name }}"'", + # "inputs": { + # "deb_build": "'"${deb_build}"'", + # "rpm_build": "'"${rpm_build}"'" + # } + # }'