mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-11 17:59:00 +08:00
WIP: Fix fetching Uranium
This commit is contained in:
parent
88196fa62b
commit
208ab6421f
23
.github/workflows/cicd.yml
vendored
23
.github/workflows/cicd.yml
vendored
@ -1,6 +1,6 @@
|
||||
---
|
||||
name: CI/CD
|
||||
on: [push, pull_request]
|
||||
name: CI/CD for push
|
||||
on: push
|
||||
jobs:
|
||||
build:
|
||||
name: Build and test
|
||||
@ -8,6 +8,23 @@ jobs:
|
||||
container: ultimaker/cura-build-environment
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v1.2.0
|
||||
uses: actions/checkout@v1
|
||||
- name: Build and test
|
||||
env:
|
||||
GIT_REF_NAME: github.ref
|
||||
run: docker/build.sh
|
||||
|
||||
name: CI/CD for pull_request
|
||||
on: pull_request
|
||||
jobs:
|
||||
build:
|
||||
name: Build and test
|
||||
runs-on: ubuntu-latest
|
||||
container: ultimaker/cura-build-environment
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v1
|
||||
- name: Build and test
|
||||
env:
|
||||
GIT_REF_NAME: github.base_ref
|
||||
run: docker/build.sh
|
||||
|
@ -20,7 +20,8 @@ cd "${PROJECT_DIR}"
|
||||
# Check the branch to use:
|
||||
# 1. Use the Uranium branch with the branch same if it exists.
|
||||
# 2. Otherwise, use the default branch name "master"
|
||||
URANIUM_BRANCH="${CI_COMMIT_REF_NAME:-master}"
|
||||
echo "GIT_REF_NAME: ${GIT_REF_NAME}"
|
||||
URANIUM_BRANCH="${GIT_REF_NAME:-master}"
|
||||
output="$(git ls-remote --heads https://github.com/Ultimaker/Uranium.git "${URANIUM_BRANCH}")"
|
||||
if [ -z "${output}" ]; then
|
||||
echo "Could not find Uranium banch ${URANIUM_BRANCH}, fallback to use master."
|
||||
|
Loading…
x
Reference in New Issue
Block a user