Skip to content

Commit

Permalink
Add automatic trigger for push events to build packages (#99)
Browse files Browse the repository at this point in the history
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/DocSpace-buildtools/pulls/99
Reviewed-by: Evgeniy Antonyuk <[email protected]>
Co-authored-by: Vladimir Ischenko <[email protected]>
Co-committed-by: Vladimir Ischenko <[email protected]>
  • Loading branch information
isboston authored and evgeniy-antonyuk committed Nov 29, 2024
1 parent 17f073f commit ed7c7bb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/build_packages.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
name: Build packages

on:
push:
branches:
- 'release/**'
- 'hotfix/**'
- 'develop'
paths:
- 'install/common/**'
- 'install/deb/**'
- 'install/rpm/**'
workflow_dispatch:
inputs:
branch-buildtools:
Expand All @@ -25,9 +34,9 @@ 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 || 'develop' }}
BRANCH_CLIENT: ${{ github.event.inputs.branch-client != '' && github.event.inputs.branch-client || 'develop' }}
BRANCH_SERVER: ${{ github.event.inputs.branch-server != '' && github.event.inputs.branch-server || 'develop' }}
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' }}

jobs:
build:
Expand Down
13 changes: 0 additions & 13 deletions .github/workflows/cron-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,3 @@ jobs:
-H "Accept: application/vnd.github.everest-preview+json" \
--data '{"event_type": "cron-trigger-action", "client_payload": { "branches": ${{ steps.list-branches.outputs.json_output }}}}'
curl \
-X POST \
-u "${{ secrets.USERNAME}}:${{secrets.TOKEN}}" \
https://api.github.com/repos/ONLYOFFICE/DocSpace/actions/workflows/59268961/dispatches \
-H "Accept: application/vnd.github.everest-preview+json" \
--data '{
"ref": "${{ steps.list-branches.outputs.last_branch }}",
"inputs": {
"branch-buildtools": "${{ steps.list-branches.outputs.last_branch }}",
"branch-client": "${{ steps.list-branches.outputs.last_branch }}",
"branch-server": "${{ steps.list-branches.outputs.last_branch }}"
}
}'

0 comments on commit ed7c7bb

Please sign in to comment.