diff --git a/content/actions/use-cases-and-examples/deploying/installing-an-apple-certificate-on-macos-runners-for-xcode-development.md b/content/actions/use-cases-and-examples/deploying/installing-an-apple-certificate-on-macos-runners-for-xcode-development.md index d8ecef0d8a..9db381508c 100644 --- a/content/actions/use-cases-and-examples/deploying/installing-an-apple-certificate-on-macos-runners-for-xcode-development.md +++ b/content/actions/use-cases-and-examples/deploying/installing-an-apple-certificate-on-macos-runners-for-xcode-development.md @@ -116,7 +116,7 @@ jobs: mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles - name: Build app - ... + # ... ``` {% note %} diff --git a/content/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages.md b/content/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages.md index 7fe6079ad7..b001cc2bfe 100644 --- a/content/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages.md +++ b/content/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages.md @@ -98,20 +98,20 @@ steps: - name: Checkout repository uses: {% data reusables.actions.action-checkout %} - # Initializes CodeQL tools and creates a codebase for analysis. - - name: Initialize CodeQL - uses: {% data reusables.actions.action-codeql-action-init %} - with: - languages: {% raw %}${{ matrix.language }}{% endraw %} - - if: {% raw %}${{ matrix.build-mode == 'manual' }}{% endraw %} - name: Build C and C++ code - run: | - echo 'If you are using a "manual" build mode for one or more of the' \ - 'languages you are analyzing, replace this with the commands to build' \ - 'your code, for example:' - echo ' make bootstrap' - echo ' make release' - exit 1 +# Initializes CodeQL tools and creates a codebase for analysis. +- name: Initialize CodeQL + uses: {% data reusables.actions.action-codeql-action-init %} + with: + languages: {% raw %}${{ matrix.language }}{% endraw %} +- if: {% raw %}${{ matrix.build-mode == 'manual' }}{% endraw %} + name: Build C and C++ code + run: | + echo 'If you are using a "manual" build mode for one or more of the' \ + 'languages you are analyzing, replace this with the commands to build' \ + 'your code, for example:' + echo ' make bootstrap' + echo ' make release' + exit 1 ``` {% endif %} diff --git a/content/code-security/code-scanning/troubleshooting-code-scanning/some-languages-not-analyzed.md b/content/code-security/code-scanning/troubleshooting-code-scanning/some-languages-not-analyzed.md index 26620b1141..e8cb68ac53 100644 --- a/content/code-security/code-scanning/troubleshooting-code-scanning/some-languages-not-analyzed.md +++ b/content/code-security/code-scanning/troubleshooting-code-scanning/some-languages-not-analyzed.md @@ -23,7 +23,7 @@ If you're using advanced setup and your workflow doesn't explicitly specify the permissions: security-events: write actions: read - ... + # ... strategy: fail-fast: false matrix: {% ifversion codeql-language-identifiers-311 %} @@ -31,7 +31,7 @@ If you're using advanced setup and your workflow doesn't explicitly specify the language: ['csharp', 'cpp', 'javascript'] {% endif %} steps: - ... + # ... - name: Initialize {% data variables.product.prodname_codeql %} uses: {% data reusables.actions.action-codeql-action-init %} with: diff --git a/content/code-security/code-scanning/troubleshooting-code-scanning/unnecessary-step-found.md b/content/code-security/code-scanning/troubleshooting-code-scanning/unnecessary-step-found.md index 4aa02de684..b9e4f6fa33 100644 --- a/content/code-security/code-scanning/troubleshooting-code-scanning/unnecessary-step-found.md +++ b/content/code-security/code-scanning/troubleshooting-code-scanning/unnecessary-step-found.md @@ -48,7 +48,7 @@ Remove the lines from the {% data variables.product.prodname_codeql %} workflow. - name: Initialize {% data variables.product.prodname_codeql %} uses: {% data reusables.actions.action-codeql-action-init %} - ... + # ... ``` For more information about editing the {% data variables.product.prodname_codeql %} workflow file, see "[AUTOTITLE](/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning#editing-a-code-scanning-workflow)." diff --git a/content/code-security/supply-chain-security/understanding-your-software-supply-chain/configuring-dependency-review.md b/content/code-security/supply-chain-security/understanding-your-software-supply-chain/configuring-dependency-review.md index b755de2bf5..cc49d2b1e1 100644 --- a/content/code-security/supply-chain-security/understanding-your-software-supply-chain/configuring-dependency-review.md +++ b/content/code-security/supply-chain-security/understanding-your-software-supply-chain/configuring-dependency-review.md @@ -177,8 +177,8 @@ Notice that all of the examples use a short version number for the action (`v3`) # ([String]). Representing a path to a configuration file local to the repository or in an external repository. # Possible values: An absolute path to a local file or an external file. config-file: './.github/dependency-review-config.yml' - # Syntax for an external file: OWNER/REPOSITORY/FILENAME@BRANCH - config-file: 'github/octorepo/dependency-review-config.yml@main' + # Optional alternative syntax for an external file: OWNER/REPOSITORY/FILENAME@BRANCH (uncomment if preferred) + # config-file: 'github/octorepo/dependency-review-config.yml@main' # ([Token]) Use if your configuration file resides in a private external repository. # Possible values: Any GitHub token with read access to the private external repository. diff --git a/content/issues/planning-and-tracking-with-projects/automating-your-project/automating-projects-using-actions.md b/content/issues/planning-and-tracking-with-projects/automating-your-project/automating-projects-using-actions.md index 1e689954a7..f3650c92c6 100644 --- a/content/issues/planning-and-tracking-with-projects/automating-your-project/automating-projects-using-actions.md +++ b/content/issues/planning-and-tracking-with-projects/automating-your-project/automating-projects-using-actions.md @@ -121,16 +121,17 @@ jobs: } }' -f org=$ORGANIZATION -F number=$PROJECT_NUMBER > project_data.json -# Parses the response from the API query and stores the relevant IDs as environment variables. Modify this to get the ID for different fields or options. For example: -# -# - To get the ID of a field called `Team`, add `echo 'TEAM_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Team") | .id' project_data.json) >> $GITHUB_ENV`. -# - To get the ID of an option called `Octoteam` for the `Team` single select field, add `echo 'OCTOTEAM_OPTION_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Team") |.options[] | select(.name=="Octoteam") |.id' project_data.json) >> $GITHUB_ENV`. -# -# **Note:** This workflow assumes that you have a project with a single select field called "Status" that includes an option called "Todo" and a date field called "Date posted". You must modify this section to match the fields that are present in your table. + # Parses the response from the API query and stores the relevant IDs as environment variables. Modify this to get the ID for different fields or options. For example: + # + # - To get the ID of a field called `Team`, add `echo 'TEAM_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Team") | .id' project_data.json) >> $GITHUB_ENV`. + # - To get the ID of an option called `Octoteam` for the `Team` single select field, add `echo 'OCTOTEAM_OPTION_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Team") |.options[] | select(.name=="Octoteam") |.id' project_data.json) >> $GITHUB_ENV`. + # + # **Note:** This workflow assumes that you have a project with a single select field called "Status" that includes an option called "Todo" and a date field called "Date posted". You must modify this section to match the fields that are present in your table. + echo 'PROJECT_ID='$(jq '.data.organization.projectV2.id' project_data.json) >> $GITHUB_ENV echo 'DATE_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Date posted") | .id' project_data.json) >> $GITHUB_ENV echo 'STATUS_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .id' project_data.json) >> $GITHUB_ENV - echo 'TODO_OPTION_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .options[] | select(.name=="Todo") |.id' project_data.json) >> $GITHUB_ENV + echo 'TODO_OPTION_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Todo") | .options[] | select(.name=="Todo") |.id' project_data.json) >> $GITHUB_ENV # Sets environment variables for this step. `GH_TOKEN` is the token generated in the first step. `PR_ID` is the ID of the pull request that triggered this workflow. - name: Add PR to project @@ -148,8 +149,8 @@ jobs: } }' -f project=$PROJECT_ID -f pr=$PR_ID --jq '.data.addProjectV2ItemById.item.id')" -# Stores the ID of the created item as an environment variable. - echo 'ITEM_ID='$item_id >> $GITHUB_ENV + # Stores the ID of the created item as an environment variable. + echo 'ITEM_ID='$item_id >> $GITHUB_ENV # Saves the current date as an environment variable in `yyyy-mm-dd` format. - name: Get date @@ -253,16 +254,17 @@ jobs: } }' -f org=$ORGANIZATION -F number=$PROJECT_NUMBER > project_data.json -# Parses the response from the API query and stores the relevant IDs as environment variables. Modify this to get the ID for different fields or options. For example: -# -# - To get the ID of a field called `Team`, add `echo 'TEAM_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Team") | .id' project_data.json) >> $GITHUB_ENV`. -# - To get the ID of an option called `Octoteam` for the `Team` single select field, add `echo 'OCTOTEAM_OPTION_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Team") |.options[] | select(.name=="Octoteam") |.id' project_data.json) >> $GITHUB_ENV`. -# -# **Note:** This workflow assumes that you have a project with a single select field called "Status" that includes an option called "Todo" and a date field called "Date posted". You must modify this section to match the fields that are present in your table. + # Parses the response from the API query and stores the relevant IDs as environment variables. Modify this to get the ID for different fields or options. For example: + # + # - To get the ID of a field called `Team`, add `echo 'TEAM_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Team") | .id' project_data.json) >> $GITHUB_ENV`. + # - To get the ID of an option called `Octoteam` for the `Team` single select field, add `echo 'OCTOTEAM_OPTION_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Team") |.options[] | select(.name=="Octoteam") |.id' project_data.json) >> $GITHUB_ENV`. + # + # **Note**: This workflow assumes that you have a project with a single select field called "Status" that includes an option called "Todo" and a date field called "Date posted". You must modify this section to match the fields that are present in your table. + echo 'PROJECT_ID='$(jq '.data.organization.projectV2.id' project_data.json) >> $GITHUB_ENV echo 'DATE_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Date posted") | .id' project_data.json) >> $GITHUB_ENV echo 'STATUS_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .id' project_data.json) >> $GITHUB_ENV - echo 'TODO_OPTION_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .options[] | select(.name=="Todo") |.id' project_data.json) >> $GITHUB_ENV + echo 'TODO_OPTION_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Todo") | .options[] | select(.name=="Todo") |.id' project_data.json) >> $GITHUB_ENV # Sets environment variables for this step. Replace `YOUR_TOKEN` with the name of the secret that contains your {% data variables.product.pat_generic %}. - name: Add PR to project @@ -280,8 +282,8 @@ jobs: } }' -f project=$PROJECT_ID -f pr=$PR_ID --jq '.data.addProjectV2ItemById.item.id')" -# Stores the ID of the created item as an environment variable. - echo 'ITEM_ID='$item_id >> $GITHUB_ENV + # Stores the ID of the created item as an environment variable. + echo 'ITEM_ID='$item_id >> $GITHUB_ENV # Saves the current date as an environment variable in `yyyy-mm-dd` format. - name: Get date diff --git a/content/pages/getting-started-with-github-pages/using-custom-workflows-with-github-pages.md b/content/pages/getting-started-with-github-pages/using-custom-workflows-with-github-pages.md index 3a4a9e45e9..a5f81f3844 100644 --- a/content/pages/getting-started-with-github-pages/using-custom-workflows-with-github-pages.md +++ b/content/pages/getting-started-with-github-pages/using-custom-workflows-with-github-pages.md @@ -53,7 +53,7 @@ For more information, see the [`deploy-pages`](https://github.com/marketplace/ac {% raw %} ```yaml -... +# ... jobs: deploy: @@ -70,7 +70,7 @@ jobs: - name: Deploy artifact id: deployment uses: actions/deploy-pages@v1 -... +# ... ``` {% endraw %} @@ -80,7 +80,7 @@ jobs: You can link your `build` and `deploy` jobs in a single workflow file, eliminating the need to create two separate files to get the same result. To get started on your workflow file, under `jobs` you can define a `build` and `deploy` job to execute your jobs. ```yaml -... +# ... jobs: # Build job @@ -111,13 +111,13 @@ jobs: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v2 -... +# ... ``` In certain cases, you might choose to combine everything into a single job, especially if there is no need for a build process. Consequently, you would solely focus on the deployment step. ```yaml -... +# ... jobs: # Single deploy job no building @@ -140,7 +140,7 @@ jobs: id: deployment uses: actions/deploy-pages@v2 -... +# ... ``` You can define your jobs to be run on different runners, sequentially, or in parallel. For more information, see "[AUTOTITLE](/actions/using-jobs)."