diff --git a/.github/workflows/ci-oci-docker-install.yml b/.github/workflows/ci-oci-docker-install.yml index 659db31b46..580b1b2de2 100644 --- a/.github/workflows/ci-oci-docker-install.yml +++ b/.github/workflows/ci-oci-docker-install.yml @@ -6,6 +6,11 @@ on: paths: - '.github/workflows/ci-oci-docker-install.yml' - 'install/OneClickInstall/install-Docker.sh' + push: + branches: + - 'hotfix/**' + - 'release/**' + - 'develop' workflow_dispatch: inputs: offline: @@ -13,6 +18,9 @@ on: required: true default: false type: boolean + repository_dispatch: + types: + - oci-docker-install-trigger jobs: Install-OneClickInstall-Docker: @@ -20,7 +28,17 @@ jobs: steps: - name: Determine Branch Name run: | - BRANCH_NAME=$([ "${{ github.event_name }}" = "pull_request" ] && echo "${{ github.event.pull_request.head.ref }}" || echo "${GITHUB_REF#refs/heads/}") + case "${{ github.event_name }}" in + "pull_request") + BRANCH_NAME="${{ github.event.pull_request.head.ref }}" + ;; + "repository_dispatch") + BRANCH_NAME="${{ github.event.client_payload.branch }}" + ;; + *) + BRANCH_NAME="${GITHUB_REF#refs/heads/}" + ;; + esac echo "BRANCH_NAME=${BRANCH_NAME:-master}" >> $GITHUB_ENV - name: Free Disk Space diff --git a/.github/workflows/config-build.yml b/.github/workflows/config-build.yml index c44c5eebc5..791ed67162 100644 --- a/.github/workflows/config-build.yml +++ b/.github/workflows/config-build.yml @@ -9,6 +9,7 @@ on: paths: - 'config/**' - 'install/docker/Dockerfile.app' + - 'install/docker/*entrypoint*.*' workflow_dispatch: jobs: diff --git a/.github/workflows/main-build.yml b/.github/workflows/main-build.yml index db31fe585f..1ebf06cc95 100644 --- a/.github/workflows/main-build.yml +++ b/.github/workflows/main-build.yml @@ -88,3 +88,14 @@ jobs: -f branch=${{ matrix.branch }} \ -f version=${VERSION} fi + + - name: Dispatch Action + run: | + echo "OCI docker test on branch ${{ matrix.branch }}" + + curl \ + -X POST \ + -u "${{ secrets.USERNAME}}:${{secrets.TOKEN}}" \ + -H "Accept: application/vnd.github.v3+json" \ + https://api.github.com/repos/ONLYOFFICE/DocSpace-buildtools/dispatches \ + -d '{"event_type": "oci-docker-install-trigger", "client_payload": {"branch": "'"${{ matrix.branch }}"'"}}'