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

Publishing Docker images page contains broken YML code #33794

Closed
1 task done
snorremd opened this issue Jul 2, 2024 · 6 comments · Fixed by #33917
Closed
1 task done

Publishing Docker images page contains broken YML code #33794

snorremd opened this issue Jul 2, 2024 · 6 comments · Fixed by #33917
Labels
actions This issue or pull request should be reviewed by the docs actions team content This issue or pull request belongs to the Docs Content team help wanted Anyone is welcome to open a pull request to fix this issue

Comments

@snorremd
Copy link
Contributor

snorremd commented Jul 2, 2024

Code of Conduct

What article on docs.github.com is affected?

All articles using the {% data reusables.actions.artifact-attestations-step-for-container-images %} template.
For example: https://github.com/github/docs/blob/main/content/actions/publishing-packages/publishing-docker-images.md

Specifically the problem is that the attestations-step-for-container-images is using an asterisk * instead of a dash - in the example.

Now it looks like this:

      - name: Build and push Docker images
        id: push
        uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
        with:
          context: .
          push: true
          tags: ${{ steps.meta.outputs.tags }}
          labels: ${{ steps.meta.outputs.labels }}

      
      * name: Generate artifact attestation
        uses: actions/attest-build-provenance@v1
        with:
          subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
          subject-digest: ${{ steps.push.outputs.digest }}
          push-to-registry: true

This can be confusing as one could believe the asterisk is some kind of special case.

What changes are you suggesting?

Change the https://github.com/github/docs/blob/main/data/reusables/actions/artifact-attestations-step-for-container-images.md file to use a - so the GitHub Actions examples using attestation step are not broken.

This also requires changing the setup so the linter does not complain. See my attempts at fixing this in closed PR: #33793

Additional information

No response

@snorremd snorremd added the content This issue or pull request belongs to the Docs Content team label Jul 2, 2024
Copy link

welcome bot commented Jul 2, 2024

Thanks for opening this issue. A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label Jul 2, 2024
@nguyenalex836 nguyenalex836 added actions This issue or pull request should be reviewed by the docs actions team waiting for review Issue/PR is waiting for a writer's review and removed triage Do not begin working on this issue until triaged by the team labels Jul 2, 2024
@nguyenalex836
Copy link
Contributor

@snorremd Thank you for opening an issue! I'll get this triaged for review ✨

@subatoi
Copy link
Contributor

subatoi commented Jul 2, 2024

Thank you @snorremd — I suspect the linter just got overzealous at some point. You or anyone else is welcome to submit a PR with the suggested change (asterisk -> hyphen).

And thank you so much for raising an issue ✨

@subatoi subatoi added the help wanted Anyone is welcome to open a pull request to fix this issue label Jul 2, 2024
@nguyenalex836 nguyenalex836 removed the waiting for review Issue/PR is waiting for a writer's review label Jul 2, 2024
@janbrasna
Copy link
Contributor

The linter is still angry:

data/reusables/actions/artifact-attestations-step-for-container-images.md
    ERROR
    Fixable!
    Rule        MD004, ul-style Unordered list style
    Detail      Expected: asterisk; Actual: dash
    Line        1      
ℹ 🕦 Markdownlint finished in 30.0 ms
✖ Found 1 file with error
Error: Process completed with exit code 1.

@subatoi Do I get the OP or anyone is expected to open a PR, and even with a failing CI it would get approved et al.?

@subatoi
Copy link
Contributor

subatoi commented Jul 10, 2024

Hi @janbrasna — That's correct, provided that the error is the cause of the linter failure

@janbrasna

This comment was marked as outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
actions This issue or pull request should be reviewed by the docs actions team content This issue or pull request belongs to the Docs Content team help wanted Anyone is welcome to open a pull request to fix this issue
4 participants