From fb56c6fcac3db8bc0629811500d9120de19b7d6b Mon Sep 17 00:00:00 2001 From: Matic Lubej Date: Tue, 7 Nov 2023 16:16:14 +0100 Subject: [PATCH] Enable Github actions to trigger internal Gitlab CI (#490) * update actions and gitlab CI * update project path * use trigger API to build internal docker instead * test trigger on branch push * fix github action * test why trigger workflow not starting * fix branch name * remove step in trigger job * remove test branch * move mirror to a separate workflow, update pipeline running rules * Revert "move mirror to a separate workflow, update pipeline running rules" This reverts commit 92b4b04649e9ab820490da32d67d32e740035130. --------- Co-authored-by: Matic Lubej --- .github/workflows/ci_action.yml | 1 + .github/workflows/ci_trigger.yml | 19 +++++++++++++++++++ .gitlab-ci.yml | 4 ++-- 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/ci_trigger.yml diff --git a/.github/workflows/ci_action.yml b/.github/workflows/ci_action.yml index 2512232b..2617d7b8 100644 --- a/.github/workflows/ci_action.yml +++ b/.github/workflows/ci_action.yml @@ -125,6 +125,7 @@ jobs: with: args: "https://git.sinergise.com/eo/code/sentinelhub-py-dev/" env: + FOLLOW_TAGS: "true" GITLAB_HOSTNAME: "git.sinergise.com" GITLAB_USERNAME: "github-action" GITLAB_PASSWORD: ${{ secrets.GITLAB_PASSWORD }} diff --git a/.github/workflows/ci_trigger.yml b/.github/workflows/ci_trigger.yml new file mode 100644 index 00000000..5bdd9419 --- /dev/null +++ b/.github/workflows/ci_trigger.yml @@ -0,0 +1,19 @@ +name: trigger + +on: + release: + types: + - published + +jobs: + trigger: + runs-on: ubuntu-latest + steps: + - name: Trigger API + run: > + curl -X POST --fail \ + -F token=${{ secrets.GITLAB_PIPELINE_TRIGGER_TOKEN }} \ + -F ref=main \ + -F variables[CUSTOM_RUN_TAG]=auto \ + -F variables[LAYER_NAME]=dotai-eo \ + https://git.sinergise.com/api/v4/projects/1031/trigger/pipeline diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2107b30a..87226e29 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -15,8 +15,8 @@ update_base_image: run_sh_integration_tests: stage: test image: "$BASE_IMAGE" - dependencies: [ ] - needs: [ ] + dependencies: [] + needs: [] rules: - when: always if: '$UPDATE_BASE_IMAGE != "true"'