Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No such reference 'origin/main' error in github action #2371

Closed
leungkinghin-ct opened this issue Dec 20, 2024 · 1 comment
Closed

No such reference 'origin/main' error in github action #2371

leungkinghin-ct opened this issue Dec 20, 2024 · 1 comment

Comments

@leungkinghin-ct
Copy link

leungkinghin-ct commented Dec 20, 2024

When i run spotless command in github action, it throws error as below. Could you please check why it would happen and how it can be resolved? Thank you.

Error:  Failed to execute goal com.diffplug.spotless:spotless-maven-plugin:2.43.0:check (default-cli) on project subscriptions-tracker: Execution default-cli of goal com.diffplug.spotless:spotless-maven-plugin:2.43.0:check failed: No such reference 'origin/main' -> [Help 1]
Error:  
Error:  To see the full stack trace of the errors, re-run Maven with the -e switch.
Error:  Re-run Maven using the -X switch to enable full debug logging.
Error:  
Error:  For more information about the errors and possible solutions, please read the following articles:
Error:  [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
Error: Process completed with exit code 1.

Following is my github action yaml file

name: Continuous Integration Pipeline


on: [push]

jobs:
  checks:
    name: Code Checking
    runs-on: ubuntu-latest
    steps:
      - name: Git Checkout
        uses: actions/checkout@v4
      - uses: actions/setup-java@v4
        with:
          java-version: '17'
          distribution: 'oracle'
          cache: 'maven'
      - name: Clean and Build with Maven
        run: mvn clean && mvn install
      - name: Code Formatting
        run: mvn --batch-mode --no-transfer-progress spotless:check

Maven version : 4.0.0
spotless version : 2.43.0

@nedtwigg
Copy link
Member

Dupe of #710

@nedtwigg nedtwigg closed this as not planned Won't fix, can't repro, duplicate, stale Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants