From 3f46d031d01fd7d791c2c25df56c603f49f29a7f Mon Sep 17 00:00:00 2001 From: Jordan Guedj Date: Tue, 5 Mar 2024 17:47:12 +0100 Subject: [PATCH] (wip) --- .github/workflows/trigger-gitlab-ci.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/trigger-gitlab-ci.yml diff --git a/.github/workflows/trigger-gitlab-ci.yml b/.github/workflows/trigger-gitlab-ci.yml new file mode 100644 index 00000000000..26de876e99a --- /dev/null +++ b/.github/workflows/trigger-gitlab-ci.yml @@ -0,0 +1,22 @@ +name: Trigger Gitlab CI/CD pipeline +run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 +on: [push] +jobs: + trigger-gitlab-pipeline: + runs-on: ubuntu-latest + steps: + - name: configure environment + shell: bash + run: | + echo "REPO_PUBLIC_URL=${{ github.server_url }}/${{ github.repository }}.git" >> $GITHUB_ENV + IFS='/' read -ra REPO_PARTS <<< "$GITHUB_REPOSITORY" + echo "REPO_NAME=${REPO_PARTS[1]}" >> $GITHUB_ENV + - name: clone repository + shell: bash + run: git clone --depth 1 -b ci-pipeline ${{ env.REPO_PUBLIC_URL }} + - name: trigger Gitlab pipeline + shell: bash + env: + GITLAB_API_TOKEN: ${{ secrets.GITLAB_API_TOKEN }} + run: ./gitlab-ci-pipeline.sh + working-directory: ${{ env.REPO_NAME }}