mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-05-21 23:32:14 +00:00
Fixed pipeline
This commit is contained in:
parent
d46688f364
commit
33ba745625
25
.github/workflows/build-and-release.yml
vendored
25
.github/workflows/build-and-release.yml
vendored
@ -12,6 +12,10 @@ on:
|
|||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && (github.event.action != 'labeled' || github.event.label.name == 'run-pipeline') && github.event.pull_request.number || github.run_id }}
|
||||||
|
cancel-in-progress: ${{ github.event_name == 'pull_request' && (github.event.action != 'labeled' || github.event.label.name == 'run-pipeline') }}
|
||||||
|
|
||||||
env:
|
env:
|
||||||
RETENTION_INTERMEDIATE_ASSETS: 1
|
RETENTION_INTERMEDIATE_ASSETS: 1
|
||||||
RETENTION_RELEASE_ASSETS: 30
|
RETENTION_RELEASE_ASSETS: 30
|
||||||
@ -37,6 +41,8 @@ jobs:
|
|||||||
id: determine
|
id: determine
|
||||||
env:
|
env:
|
||||||
EVENT_NAME: ${{ github.event_name }}
|
EVENT_NAME: ${{ github.event_name }}
|
||||||
|
PR_ACTION: ${{ github.event.action }}
|
||||||
|
ACTION_LABEL_NAME: ${{ github.event.label.name }}
|
||||||
REF: ${{ github.ref }}
|
REF: ${{ github.ref }}
|
||||||
PR_LABELS: ${{ join(github.event.pull_request.labels.*.name, ' ') }}
|
PR_LABELS: ${{ join(github.event.pull_request.labels.*.name, ' ') }}
|
||||||
PR_HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }}
|
PR_HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
@ -55,6 +61,11 @@ jobs:
|
|||||||
is_internal_pr=true
|
is_internal_pr=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
has_run_pipeline_label=false
|
||||||
|
if [[ " $PR_LABELS " == *" run-pipeline "* ]]; then
|
||||||
|
has_run_pipeline_label=true
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ "$REF" == refs/tags/v* ]]; then
|
if [[ "$REF" == refs/tags/v* ]]; then
|
||||||
is_release=true
|
is_release=true
|
||||||
build_enabled=true
|
build_enabled=true
|
||||||
@ -65,13 +76,21 @@ jobs:
|
|||||||
build_enabled=true
|
build_enabled=true
|
||||||
artifact_retention_days=7
|
artifact_retention_days=7
|
||||||
skip_reason=""
|
skip_reason=""
|
||||||
elif [[ "$EVENT_NAME" == "pull_request" && " $PR_LABELS " == *" run-pipeline "* ]]; then
|
elif [[ "$EVENT_NAME" == "pull_request" && "$PR_ACTION" == "labeled" && "$ACTION_LABEL_NAME" == "run-pipeline" ]]; then
|
||||||
is_labeled_pr=true
|
is_labeled_pr=true
|
||||||
is_pr_build=true
|
is_pr_build=true
|
||||||
build_enabled=true
|
build_enabled=true
|
||||||
artifact_retention_days=3
|
artifact_retention_days=3
|
||||||
skip_reason=""
|
skip_reason=""
|
||||||
elif [[ "$EVENT_NAME" == "pull_request" && " $PR_LABELS " != *" run-pipeline "* ]]; then
|
elif [[ "$EVENT_NAME" == "pull_request" && "$PR_ACTION" != "labeled" && "$has_run_pipeline_label" == "true" ]]; then
|
||||||
|
is_labeled_pr=true
|
||||||
|
is_pr_build=true
|
||||||
|
build_enabled=true
|
||||||
|
artifact_retention_days=3
|
||||||
|
skip_reason=""
|
||||||
|
elif [[ "$EVENT_NAME" == "pull_request" && "$PR_ACTION" == "labeled" ]]; then
|
||||||
|
skip_reason="Build disabled: label '${ACTION_LABEL_NAME}' is not 'run-pipeline'."
|
||||||
|
elif [[ "$EVENT_NAME" == "pull_request" && "$has_run_pipeline_label" != "true" ]]; then
|
||||||
skip_reason="Build disabled: PR does not have the required 'run-pipeline' label."
|
skip_reason="Build disabled: PR does not have the required 'run-pipeline' label."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -685,11 +704,9 @@ jobs:
|
|||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/bin
|
|
||||||
~/.cargo/git/db/
|
~/.cargo/git/db/
|
||||||
~/.cargo/registry/index/
|
~/.cargo/registry/index/
|
||||||
~/.cargo/registry/cache/
|
~/.cargo/registry/cache/
|
||||||
~/.rustup/toolchains
|
|
||||||
runtime/target
|
runtime/target
|
||||||
|
|
||||||
key: target-${{ matrix.dotnet_runtime }}-rust-${{ env.RUST_VERSION }}
|
key: target-${{ matrix.dotnet_runtime }}-rust-${{ env.RUST_VERSION }}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user