- 
                Notifications
    You must be signed in to change notification settings 
- Fork 64k
Labels
actionsThis issue or pull request should be reviewed by the docs actions teamThis issue or pull request should be reviewed by the docs actions teamcontentThis issue or pull request belongs to the Docs Content teamThis issue or pull request belongs to the Docs Content teamhelp wantedAnyone is welcome to open a pull request to fix this issueAnyone is welcome to open a pull request to fix this issuepumpkin-spiceSpecifically tracked Hacktoberfest issue - internal purposesSpecifically tracked Hacktoberfest issue - internal purposes
Description
Code of Conduct
- I have read and agree to the GitHub Docs project's Code of Conduct
What article on docs.github.com is affected?
YAML examples in https://docs.github.com/actions
What part(s) of the article would you like to see updated?
YAML treats floats like 2.10 as 2.1. This can lead to workflows using a different language version than intended. We should update the YAML examples to quote language versions to avoid this. To help users who copy-paste-modify without understanding the nuance, we should quote all language versions, even ones that would not be affected by this parsing.
For example:
jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: [3.6, 3.7, 3.8, 3.9]
should be changed to
jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ["3.6", "3.7", "3.8", "3.9"]
Then if a user copies the example but wants to include version 3.10, they can easily plug in the new value without knowing they need to add quotes.
Additional information
No response
Actions articles with examples that need quotes
ethomson and muzimuzhi
Metadata
Metadata
Assignees
Labels
actionsThis issue or pull request should be reviewed by the docs actions teamThis issue or pull request should be reviewed by the docs actions teamcontentThis issue or pull request belongs to the Docs Content teamThis issue or pull request belongs to the Docs Content teamhelp wantedAnyone is welcome to open a pull request to fix this issueAnyone is welcome to open a pull request to fix this issuepumpkin-spiceSpecifically tracked Hacktoberfest issue - internal purposesSpecifically tracked Hacktoberfest issue - internal purposes