From 039c97632920ea1f6c0e70afa527bcbb54b11aae Mon Sep 17 00:00:00 2001 From: Vladimir Ischenko Date: Thu, 21 Nov 2024 15:26:51 +0300 Subject: [PATCH] Add env branche name --- .github/workflows/ci-oci-docker-install.yml | 8 ++++++-- .github/workflows/config-build.yml | 2 +- .github/workflows/main-build.yml | 6 +++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-oci-docker-install.yml b/.github/workflows/ci-oci-docker-install.yml index b3407b4384..c50a82ca4a 100644 --- a/.github/workflows/ci-oci-docker-install.yml +++ b/.github/workflows/ci-oci-docker-install.yml @@ -18,15 +18,19 @@ on: required: true default: false type: boolean + repository_dispatch: + types: + - oci-docker-install-trigger jobs: Install-OneClickInstall-Docker: runs-on: ubuntu-22.04 + env: + BRANCH_NAME: ${{ github.event.client_payload.branch || 'master' }} 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/}") - echo "BRANCH_NAME=${BRANCH_NAME:-master}" >> $GITHUB_ENV + echo "BRANCH_NAME=${{ env.BRANCH_NAME }}" >> $GITHUB_ENV - name: Free Disk Space run: | diff --git a/.github/workflows/config-build.yml b/.github/workflows/config-build.yml index 7482364060..c4c47e478b 100644 --- a/.github/workflows/config-build.yml +++ b/.github/workflows/config-build.yml @@ -11,7 +11,7 @@ on: - 'config/**' - 'install/docker/Dockerfile.app' - 'install/docker/*entrypoint*.*' - - '.github/workflows/config-build.yml' + - '.github/workflows/ci-oci-docker-install.yml' workflow_dispatch: jobs: diff --git a/.github/workflows/main-build.yml b/.github/workflows/main-build.yml index c878592d22..7d0fdb14e3 100644 --- a/.github/workflows/main-build.yml +++ b/.github/workflows/main-build.yml @@ -13,6 +13,7 @@ on: - config-trigger-action - client-trigger-action - server-trigger-action + env: DOCKER_PATH: "/install/docker" REPO: "onlyoffice" @@ -96,6 +97,5 @@ jobs: -X POST \ -u "${{ secrets.USERNAME}}:${{secrets.TOKEN}}" \ -H "Accept: application/vnd.github.v3+json" \ - https://api.github.com/repos/ONLYOFFICE/DocSpace/actions/workflows/ci-oci-docker-install.yml/dispatches \ - -d '{"ref": "'"${{ matrix.branch }}"'", "inputs": {"offline": "false"}}' - shell: bash + https://api.github.com/repos/ONLYOFFICE/DocSpace-buildtools/dispatches \ + -d '{"event_type": "oci-docker-install-trigger", "client_payload": {"branch": "'"${{ matrix.branch }}"'"}}'