qcastel / github-actions-maven-release

Release your Java application and publish artifacts
129 stars 38 forks source link

fatal: not a git repository (or any parent up to mount point /github) #25

Closed jayfray12 closed 3 years ago

jayfray12 commented 3 years ago

Why does it think it doesn't have a git repository? I can run the maven release fine from the command line I'm mostly likely missing something but can't figure it out. Here's my log:

Run qcastel/github-actions-maven-release@v1.12.15
  with:
    access-token: ***
    version-major: false
    version-minor: false
    gpg-enabled: true
    gpg-key-id: ***
    gpg-key: ***
    gpg-passphrase: ***
    maven-repo-server-id: ossrh
    maven-repo-server-username: ***
    maven-repo-server-password: ***
    release-branch-name: master
    git-release-bot-name: release-bot
    git-release-bot-email: release-bot@github.com
    maven-project-folder: ./
    docker-registry-id: fake
    docker-registry-username: fake
    docker-registry-password: fake
    skip-perform: false
    m2-home-folder: /root/.m2
  env:
    JAVA_HOME: /usr/lib/jvm/java-11-openjdk/
/usr/bin/docker run --name e47a7b2cbf12e5480d9757499ad7860679_e9a989 --label 5588e4 --workdir /github/workspace --rm -e JAVA_HOME -e INPUT_ACCESS-TOKEN -e INPUT_VERSION-MAJOR -e INPUT_VERSION-MINOR -e INPUT_GPG-ENABLED -e INPUT_GPG-KEY-ID -e INPUT_GPG-KEY -e INPUT_GPG-PASSPHRASE -e INPUT_MAVEN-REPO-SERVER-ID -e INPUT_MAVEN-REPO-SERVER-USERNAME -e INPUT_MAVEN-REPO-SERVER*** INPUT_RELEASE-BRANCH-NAME -e INPUT_SSH-PRIVATE-KEY -e INPUT_SSH-PASSPHRASE -e INPUT_GIT-RELEASE-BOT-NAME -e INPUT_GIT-RELEASE-BOT-EMAIL -e INPUT_MAVEN-ARGS -e INPUT_MAVEN-PROJECT-FOLDER -e INPUT_MAVEN-OPTIONS -e INPUT_DOCKER-REGISTRY-ID -e INPUT_DOCKER-REGISTRY-USERNAME -e INPUT_DOCKER-REGISTRY*** INPUT_SKIP-PERFORM -e INPUT_M2-HOME-FOLDER -e GPG_ENABLED -e GPG_KEY_ID -e GPG_KEY -e GPG_PASSPHRASE -e SSH_PRIVATE_KEY -e SSH_ROOT_FOLDER -e SSH_PASSPHRASE -e MAVEN_REPO_SERVER_ID -e MAVEN_REPO_SERVER_USERNAME -e MAVEN_REPO_SERVER_PASSWORD -e MAVEN_PROJECT_FOLDER -e MAVEN_ARGS -e MAVEN_OPTION -e DOCKER_REGISTRY_ID -e DOCKER_REGISTRY_USERNAME -e DOCKER_REGISTRY_PASSWORD -e M2_HOME_FOLDER -e GIT_RELEASE_BOT_NAME -e GIT_RELEASE_BOT_EMAIL -e SKIP_PERFORM -e GITREPO_ACCESS_TOKEN -e VERSION_MAJOR -e VERSION_MINOR -e RELEASE_BRANCH_NAME -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/iDaaS-EventBuilder/iDaaS-EventBuilder":"/github/workspace" 5588e4:7a7b2cbf12e5480d9757499ad7860679  "release-github-actions.sh"
fatal: not a git repository (or any parent up to mount point /github)
Last release-bot commit: 
Current commit: 8cc6ab9555c0b84ffc024f0968e34603d21cc1ef
INFO - M2 folder '/root/.m2' not empty. We therefore will beneficy from the CI cache
Current branch: master
Release branch name: master
We are on the release branch
Using SSH folder /root/.ssh
Using M2 repository folder /root/.m2
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
/root/.m2 is empty, this means we didn't hit a potential M2 cache :(
Git checkout branch master
fatal: not a git repository (or any parent up to mount point /github)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

Here's a the workflow:

- name: Java Maven release
  uses: qcastel/github-actions-maven-release@v1.12.15
  env:
    JAVA_HOME: /usr/lib/jvm/java-11-openjdk/
  with:
    access-token: ${{ secrets.GITHUB_TOKEN }}
    version-major: ${{ github.event.inputs.increment-major }}
    version-minor: ${{ github.event.inputs.increment-minor }}
    gpg-enabled: "true"
    gpg-key-id: ${{ secrets.GPG_KEY_ID }}
    gpg-key: ${{ secrets.GPG_KEY }}
    gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }} 
    maven-repo-server-id: ossrh
    maven-repo-server-username: ${{ secrets.NEXUS_USER }}
    maven-repo-server-password: ${{ secrets.NEXUS_PASSWORD }}
qcastel commented 3 years ago

wondering if you simply missed to checkout your repo first?

- uses: actions/checkout@v2

Let me know if it wasn't that.

Btw I got a sample repo and an article that may help you:

jayfray12 commented 3 years ago

That was it! I knew I was missing something trivial. Thanks for the sample repo and article. Very helpful