GH Actions removes scheme from logged https URLs

This had me scratching my head for a long time, as I thought the output of my script running in GH Actions was different to my local machine. It turns out, GH Actions mangles https URLs in the output logs by removing the scheme from them altogether.

I think the output of logs in GH Actions should reflect exactly what is logged to stdout/in. At least, as much as possible, and it seems entirely possible to leave https URLs intact.

For example:

name: Example
    name: Echo URL
    runs-on: ubuntu-latest
      - name: Checkout
        uses: actions/checkout@v2
      - name: Echo https
        run: echo ""

Output as it appears in GitHub Actions UI:


What I would expect to see is something like:

> Run echo ""

I can see in the page source that the https is being stripped. This is the anchor element for the second “” anchor in the image above:

<a target="_blank" rel="noopener noreferrer" href=""></a>

As you can see, the href attribute is correct, but the text inside the anchor is not.

Note: AFAICT this behaviour doesn’t apply to http URLs.