Skip to content

Commit

Permalink
Add env branche name
Browse files Browse the repository at this point in the history
  • Loading branch information
isboston committed Nov 21, 2024
1 parent d54be79 commit 039c976
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/ci-oci-docker-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/config-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/main-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
- config-trigger-action
- client-trigger-action
- server-trigger-action

env:
DOCKER_PATH: "/install/docker"
REPO: "onlyoffice"
Expand Down Expand Up @@ -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 }}"'"}}'

0 comments on commit 039c976

Please sign in to comment.