advanced-security / maven-dependency-submission-action

GitHub Action for submitting Maven dependencies
MIT License
48 stars 25 forks source link

docs: Add how not to run on PRs to README (fixes #17) #41

Open vorburger opened 1 year ago

vorburger commented 1 year ago

This fixes #17

It works for me like this, see https://github.com/MariaDB4j/MariaDB4j/pull/759/files

kyleryxn commented 1 year ago

I tried this solution and does not work for me

dezzak commented 1 year ago

I'm using a two-step solution:

steps:
      - name: Get default branch
        id: defaultBranch
        run: echo "ref=refs/heads/${{github.event.repository.default_branch}}" >> $GITHUB_OUTPUT

      - name: Submit Dependency Snapshot
        uses: advanced-security/maven-dependency-submission-action@v3
        if: github.ref == steps.defaultBranch.outputs.ref