Skip to content

Commit

Permalink
build: sync common files from github_organization_management repository
Browse files Browse the repository at this point in the history
  • Loading branch information
metworkbot committed Apr 22, 2024
1 parent c6c4ed1 commit fbbb74f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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: |
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/set_variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down

0 comments on commit fbbb74f

Please sign in to comment.