-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
1af3b93 - name: Set APP_URL
run: |
if [[ "${{ github.repository }}" == "github/docs-internal" ]]; then
echo "APP_URL=https://docs-internal-staging-TREE.githubapp.com/en" >> $GITHUB_ENV
elif [[ "${{ github.repository }}" == 'github/docs' ]]; then
echo "APP_URL=https://adjective-noun-hash-4000.app.github.dev" >> $GITHUB_ENV
fi
-
name: Find code changes comment
uses: peter-evans/find-comment@b30e6a3
id: findComment
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: '' -
name: Get changes table
id: changes
timeout-minutes: 30
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
APP_URL: ${{ env.APP_URL }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: npm run content-changes-table-comment -
name: Update comment
uses: peter-evans/create-or-update-comment@e8674b0
with:
comment-id: ${{ steps.findComment.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
edit-mode: replace
body: |
### How to review these changes 👓Thank you for your contribution. To review these changes, choose one of the following options: * [Spin up a codespace][codespace] * [Set up a local development environment][local] ${{ github.repository == 'github/docs-internal' && '* [Deploy a staging server][staging]' || '' }} ${{ fromJSON('["A Hubber will need to deploy your changes internally to review.",""]')[github.repository == 'github/docs-internal'] }} <details><summary>Table of review links</summary> **Note**: Please update the URL for your staging server or codespace. ${{ steps.changes.outputs.changesTable && 'The table shows the files in the `content` directory that were changed in this pull request. This helps you review your changes on a staging server. Changes to the `data` directory are not included in this table.' || '' }} ${{ steps.changes.outputs.changesTable || '_This pull request contains code changes, so we will not generate a table of review links._' }} ${{ steps.changes.outputs.changesTable && 'Key: **fpt**: Free, Pro, Team; **ghec**: GitHub Enterprise Cloud; **ghes**: GitHub Enterprise Server' || '' }} </details> 🤖 This comment is [automatically generated][workflow]. [workflow]: ${{ github.server_url }}/${{ github.repository }}/blob/${{ github.workflow_sha }}/.github/workflows/review-comment.yml [codespace]: ${{ github.repository == 'github/docs-internal' && 'https://github.com/github/docs-team/blob/main/contributing-to-docs/tips-and-tricks/use-a-codespace-to-review.md' || 'https://docs.github.com/en/contributing/setting-up-your-environment-to-work-on-github-docs/working-on-github-docs-in-a-codespace' }} [local]: https://docs.github.com/en/contributing/setting-up-your-environment-to-work-on-github-docs/creating-a-local-environment#setting-up-your-local-environment [staging]: https://github.com/github/docs-team/blob/main/contributing-to-docs/tips-and-tricks/deploying-pr-to-staging-servers.mdgithub.repositoryhttps://docs-internal-staging-TREE.githubapp.com/en30github.event.pull_request.numbergithub.event.pull_request.base.shagithub.event.pull_request.head.shahttps://github.com/github/docs-team/blob/main/contributing-to-docs/tips-and-tricks/use-a-codespace-to-review.mdsteps.changes.outputs.changesTablehttps://docs.github.com/en/contributing/setting-up-your-environment-to-work-on-github-docs/working-on-github-docs-in-a-codespacehttps://docs.github.com/en/contributing/setting-up-your-environment-to-work-on-github-docs/creating-a-local-environment#setting-up-your-local-environmenthttps://github.com/github/docs-team/blob/main/contributing-to-docs/tips-and-tricks/deploying-pr-to-staging-servers.mdhttps://github.com/ICL007/.githubname: Context testing
on: push
jobs:
dump_contexts_to_log:
runs-on: ubuntu-latest
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Dump job context
env:
JOB_CONTEXT: ${{ toJson(job) }}
run: echo "$JOB_CONTEXT"
- name: Dump steps context
env:
STEPS_CONTEXT: ${{ toJson(steps) }}
run: echo "$STEPS_CONTEXT"
- name: Dump runner context
env:
RUNNER_CONTEXT: ${{ toJson(runner) }}
run: echo "$RUNNER_CONTEXT"
- name: Dump strategy context
env:
STRATEGY_CONTEXT: ${{ toJson(strategy) }}
run: echo "$STRATEGY_CONTEXT"
- name: Dump matrix context
env:
MATRIX_CONTEXT: ${{ toJson(matrix) }}
run: echo "$MATRIX_CONTEXT"
name: example-workflow
on: [push]
jobs:
production-deploy:
if: ${{ github.repository == 'octo-org/octo-repo-prod' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v4
with:
node-version: '14'
- run: npm install -g bats
("1")
Originally posted by @ICL007 in #2311 (comment)