diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml new file mode 100644 index 00000000000..7207feed918 --- /dev/null +++ b/.github/workflows/build-release.yml @@ -0,0 +1,56 @@ +name: Trigger Build on Release and PRs to Main + +env: + OPENBB_ENABLE_QUICK_EXIT: true + OPENBB_LOG_COLLECT: false + OPENBB_USE_ION: false + OPENBB_USE_PROMPT_TOOLKIT: false + PIP_DEFAULT_TIMEOUT: 100 + PYTHONNOUSERSITE: 1 + +on: + push: + branches: + - release/* + - hotfix/* + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + actions: write + +jobs: + trigger-windows-build: + runs-on: ubuntu-latest + steps: + - name: Trigger Windows Build + uses: benc-uk/workflow-dispatch@v1 + with: + workflow: windows10_build.yml + + trigger-macos-build: + runs-on: ubuntu-latest + steps: + - name: Trigger Windows Build + uses: benc-uk/workflow-dispatch@v1 + with: + workflow: m1_macos_build.yml + + trigger-intel-build: + runs-on: ubuntu-latest + steps: + - name: Trigger Windows Build + uses: benc-uk/workflow-dispatch@v1 + with: + workflow: intel_macos_build.yml + + trigger-docker-build: + runs-on: ubuntu-latest + steps: + - name: Trigger Windows Build + uses: benc-uk/workflow-dispatch@v1 + with: + workflow: docker.yml diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 4861ab140c5..1137494939a 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -40,3 +40,4 @@ jobs: - name: Publishing the Docker image run: | docker push "${OPENBBTERMINAL_DOCKER_POETRY_IMAGE}" + if: startsWith(github.ref, 'refs/heads/main') || startsWith(github.ref, 'refs/heads/release/') diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 1b5a5929074..124f0d20519 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -1,16 +1,13 @@ name: Deploy to GitHub Pages on: - pull_request: + push: branches: - main - types: [closed] - jobs: generate: name: Generate and Deploy documentation - if: github.event.pull_request.merged == true runs-on: ubuntu-latest steps: - name: Git checkout diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 3a9e4c4c177..16b59d08f4b 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -4,9 +4,6 @@ on: push: branches: - release/* - pull_request: - branches: - - develop - main concurrency: @@ -16,11 +13,15 @@ concurrency: jobs: integration-tests: runs-on: ubuntu-latest - if: github.event_name == 'push' || github.event.pull_request.merged == true steps: - name: Checkout code + if: github.event_name == 'push' uses: actions/checkout@v3 + - name: Checkout specific ref + if: github.event_name == 'pull_request' + run: git fetch origin ${{ github.event.pull_request.head.ref }} && git checkout FETCH_HEAD + - name: Setup Python 3.9 uses: actions/setup-python@v4 with: @@ -48,4 +49,4 @@ jobs: - name: Run integration tests run: | source $VENV - python terminal.py /home/runner/work/OpenBBTerminal_fork/OpenBBTerminal_fork/openbb_terminal/miscellaneous/integration_tests_scripts -t + python terminal.py /home/runner/work/OpenBBTerminal/OpenBBTerminal/openbb_terminal/miscellaneous/integration_tests_scripts -t diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index d76e2374c76..644ec94f7af 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -13,9 +13,8 @@ on: schedule: - cron: "0 0 * * *" -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true +permissions: + actions: write jobs: trigger-windows-build: @@ -24,12 +23,12 @@ jobs: - name: Trigger Windows Build uses: benc-uk/workflow-dispatch@v1 with: - workflow: windows.yml - + workflow: windows10_build.yml + trigger-macos-build: runs-on: ubuntu-latest steps: - - name: Trigger Windows Build + - name: Trigger M1 MacOs Build uses: benc-uk/workflow-dispatch@v1 with: workflow: m1_macos_build.yml @@ -37,8 +36,15 @@ jobs: trigger-intel-build: runs-on: ubuntu-latest steps: - - name: Trigger Windows Build + - name: Trigger Intel MacOs Build uses: benc-uk/workflow-dispatch@v1 with: workflow: intel_macos_build.yml - \ No newline at end of file + + trigger-docker-build: + runs-on: ubuntu-latest + steps: + - name: Trigger docker Build + uses: benc-uk/workflow-dispatch@v1 + with: + workflow: docker.yml