Skip to content

Commit

Permalink
GitHub Actions: reduce PR action count & fix MontiVerse branch
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Lüpges <luepges@se-rwth.de>
  • Loading branch information
luepges committed Nov 5, 2024
1 parent c9c8e4e commit a61b6bf
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/gradle_mc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
push: # run this test pipeline on every push
paths-ignore:
- "*.md"
pull_request: # and pull request
pull_request: # and pull request (Note: We can skip pull request events IFF the PR is not done from a fork)
paths-ignore:
- "*.md"
repository_dispatch: # and on request of upstream projects
Expand All @@ -28,6 +28,7 @@ permissions:

jobs:
build-generator: # Note: Build-Cache may not work yet
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name # do not run duplicate jobs on PRs
runs-on: ubuntu-latest
steps:
- name: Checkout project sources
Expand Down Expand Up @@ -134,7 +135,7 @@ jobs:

# Run the MontiVerse pipeline (tests this change on a suite of projects)
trigger-montiverse:
if: ${{ !github.event.client_payload && github.ref != 'refs/heads/dev'}} # do not run on upstream-changes or default branch
if: github.event_name == 'pull_request' # only run on PRs
runs-on: ubuntu-latest
needs: [ build-mc ]
steps:
Expand All @@ -147,7 +148,7 @@ jobs:
id: '91803' # montiverseci project id
ref: 'main'
# TODO: Include entire git path here instead (due to PRs)
variables: '{"MONTICORE_BRANCH":"${{github.ref}}"}'
variables: '{"MONTICORE_BRANCH":"${{github.event.pull_request.head.ref }}", "MONTICORE_PROJECT":"${{ github.event.pull_request.head.repo.full_name }}"}'

# TODO: Proper message in PRs (turn the MontiVerse into a GitHub Action?)?

Expand Down

0 comments on commit a61b6bf

Please sign in to comment.