Skip to content

Write github summary to separate file instead of GITHUB_STEP_SUMMARY #2112

@pavelzw

Description

@pavelzw

In certain use cases, it might be nice to have access to the github summary generated by rattler-build in a separate file (i.e. for example if you want to comment in your PR instead of making it a job comment.

Currently you can do something like this:

      - name: Build packages
        shell: bash
        run: |
          rattler-build build -c https://prefix.dev/private-forge -c conda-forge --recipe-dir recipes/ --skip-existing=all

          # Check if any packages were built
          if [ ! -d "./output" ] || [ -z "$(find ./output -type f -name "*.conda" 2>/dev/null)" ]; then
            echo "❌ no package was built, did you increment the recipe version?" >> "$GITHUB_STEP_SUMMARY"
          fi

          if [ "${{ github.event_name }}" = "pull_request" ] && [ -s "$GITHUB_STEP_SUMMARY" ]; then
            gh pr comment ${{ github.event.pull_request.number }} --body-file "$GITHUB_STEP_SUMMARY"
          fi
        env:
          RATTLER_BUILD_ENABLE_GITHUB_INTEGRATION: true
          RATTLER_BUILD_COLOR: always
          GH_TOKEN: ${{ github.token }}

Would be nice if we could do something like

rattler-build build -c https://prefix.dev/private-forge -c conda-forge --recipe-dir recipes/ --skip-existing=all --markdown-summary build-summary.md

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions