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

Use target_commitish along with repository? #546

Open
n8marti opened this issue Nov 23, 2024 · 0 comments
Open

Use target_commitish along with repository? #546

n8marti opened this issue Nov 23, 2024 · 0 comments

Comments

@n8marti
Copy link

n8marti commented Nov 23, 2024

Maybe I'm misunderstanding how this is supposed to work, but I'd like for a release created in another repo using the repository input to use the hash from the source repo, but it seems to only accept values from the repository repo:

From workflow in FaithLife-Community/LogosLinuxInstaller:

jobs:
  build:
    uses: ./.github/workflows/build-branch.yml
    with:
      branch: main

  release:
    runs-on: ubuntu-latest
    needs: build
    permissions:
      contents: write
    steps:
    - name: Download artifact from build job
      uses: actions/download-artifact@v4
      with:
        name: ${{ needs.build.outputs.bin_name }}
    - name: Run shell tasks
      run: |
        find -name oudedetai -type f -exec chmod +x {} \;
    - name: Upload release to test repo
      uses: softprops/action-gh-release@v1
      with:
        tag_name: main-latest
        target_commitish: ${{ needs.build.outputs.sha }}
        body: ''
        prerelease: true
        files: ${{ needs.build.outputs.bin_name }}
        repository: FaithLife-Community/test-builds
        token: -----

GHA output:

Run softprops/action-gh-release@v1
Updating commit from "main" to "319cffc48f9291a5f71386fedc3776e846cfb168"
⚠️ Unexpected error fetching GitHub release for tag refs/heads/main: HttpError: Validation Failed: {"resource":"Release","code":"invalid","field":"target_commitish"}
Error: Validation Failed: {"resource":"Release","code":"invalid","field":"target_commitish"}

I assume it's failing because the validation is checking against hashes in the repository repo rather than the workflow repo.

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

1 participant