Skip to content

Commit

Permalink
MontiVerseCI: Strip the branch name
Browse files Browse the repository at this point in the history
  • Loading branch information
luepges committed Jan 30, 2025
1 parent 4ce09fe commit b98d0fa
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/call_montiverse_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@ on:
description: 'The (internal) name for this project, as defined within the MontiVerse job'
type: string
required: true
branch:
description: 'The branch to use for building the MontiVerse, such as head.ref'
type: string
required: true
repo:
description: 'The project path to use for building the MontiVerse, such as head.repo.full_name'
type: string
required: true
secrets:
MONTIVERSE_TRIGGER_TOKEN:
required: true
Expand All @@ -29,13 +21,16 @@ jobs:
trigger-montiverse:
runs-on: ubuntu-latest
steps:
- name: Extract Branch Name
# We have to remove the refs/heads/ prefix from the branch which called this action
run: echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
- name: Trigger MontiVerse
# Then actually trigger the MontiVerseCI projects pipeline
uses: digital-blueprint/gitlab-pipeline-trigger-action@c81ead300bf664f76245d816268c4a1b4bed2604 # @v1.2.0
with:
host: 'git.rwth-aachen.de'
trigger_token: ${{ secrets.MONTIVERSE_TRIGGER_TOKEN }}
access_token: ${{ secrets.MONTIVERSE_ACCESS_TOKEN }} # Access is required to show the status
id: '91803' # montiverseci project id
id: '91803' # MontiVerseCI project id
ref: 'main'
# We should include the entire git path here instead of just a branch due to PRs from external projects, etc.
variables: '{"${{inputs.project}}_BRANCH":"${{inputs.branch}}", "${{inputs.project}}_PROJECT":"${{ inputs.repo }}"}'
variables: '{"${{inputs.project}}_BRANCH":"${{env.BRANCH_NAME}}", "${{inputs.project}}_PROJECT":"${{ github.event.repository.full_name }}"}'

0 comments on commit b98d0fa

Please sign in to comment.