Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into fake-pr-to-test-git…
Browse files Browse the repository at this point in the history
…lab-ci
  • Loading branch information
Jacques Xing committed Jul 29, 2024
2 parents 3310d5b + 318c166 commit c0d5736
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/trigger-gilab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
name: Trigger GitLab CI

on: [push, pull_request]
on: [pull_request]

jobs:
trigger-gitlab-ci:
name: Test against https://gitlab.nektar.info/CFD-Xing/x3d2-ci
runs-on: ubuntu-latest
steps:
- name: Trigger pipeline on CFD-Xing/gitlab-ci
id: trigger
uses: xcompact3d/x3d2@main
with:
url: https://gitlab.nektar.info
project_id: 364
token: ${{ secrets.GITLABCI }}
- name: Print GitLab pipeline URL
run: |
echo web_url=${{ steps.trigger.outputs.web_url }}
10 changes: 9 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,24 @@ inputs:
required: false
default: 'main'

outputs:
web_url:
description: "GitLab pipeline URL"
value: ${{ steps.call-webhook.outputs.web_url }}

runs:
using: "composite"
steps:
- run: |
- id: call-webhook
run: |
curl -X POST \
--fail \
-o response.json \
-F "token=${TOKEN}" \
-F "ref=${REF_NAME}" \
${URL}/api/v4/projects/${PROJECT_ID}/trigger/pipeline
# Parse URL
echo "web_url=$(cat response.json | jq -c '.web_url')" >> $GITHUB_OUTPUT
shell: bash
env:
URL: ${{ inputs.url }}
Expand Down

0 comments on commit c0d5736

Please sign in to comment.