Skip to content

Publishing Docker images page contains broken YML code #33794

@snorremd

Description

@snorremd

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    actionsThis issue or pull request should be reviewed by the docs actions teamcontentThis issue or pull request belongs to the Docs Content teamhelp wantedAnyone is welcome to open a pull request to fix this issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions