diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c2e5cf2..046314f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,12 +10,19 @@ on: repository_dispatch: types: - metwork-trigger* + workflow_dispatch: + inputs: + workflow_branch: + description: branch to use + required: true + type: string env: WORKFLOW_SCRIPTS_DIR: .github/workflows DOCKER_WORKFLOW_SCRIPTS_DIR: /src/.github/workflows PAYLOAD_BRANCH: ${{ github.event.client_payload.branch}} PAYLOAD_OS: ${{ github.event.client_payload.os}} + WORKFLOW_BRANCH: ${{ github.event.inputs.workflow_branch }} jobs: ci_build: @@ -25,7 +32,7 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - ref: ${{ github.event.client_payload.branch || github.ref }} + ref: ${{ github.event.client_payload.branch || github.event.inputs.workflow_branch || github.ref }} - name: set variables id: SetVariables run: | diff --git a/.github/workflows/set_variables.sh b/.github/workflows/set_variables.sh index 20f8a9f..4671574 100755 --- a/.github/workflows/set_variables.sh +++ b/.github/workflows/set_variables.sh @@ -20,6 +20,13 @@ case "${GITHUB_EVENT_NAME}" in else OS_VERSION=${PAYLOAD_OS} fi;; + workflow_dispatch) + B=${WORKFLOW_BRANCH} + if [ -f .build_os ]; then + OS_VERSION=`cat .build_os` + else + OS_VERSION=${PAYLOAD_OS} + fi;; push) if [ -f .build_os ]; then OS_VERSION=`cat .build_os`