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 }}