* Add concurrency settings for a bunch of workflows
* Restrict prod deployments to one at a time but disallow interrupting
* Remove redundant pull_request.types specification
* Add permission matrices to all Actions workflows
Also cleanup a few token references
* Add actions:read permissions for CodeQL
* Add prs:read permissions for unit test workflow
* Update andymckay/labeler to latest
* Drop use of rachmari/labeler fork since we aren't using its divergence
* Replace some other simple labeling use cases with andymckay/labeler
* Add permissions matrixes, mostly
* Remove unnecessary and basically invalid if condition
* More closely following the docs even though the workflow linter is angry
* Remove irrelevant path omissions from workflow linter
* Add exclusion for workflow linter
* Start parallel Docker image deploy workflows
Co-authored-by: Mike Surowiec <mikesurowiec@users.noreply.github.com>
Co-authored-by: James M. Greene <JamesMGreene@users.noreply.github.com>
* Add early access content build stage
Co-authored-by: Mike Surowiec <mikesurowiec@users.noreply.github.com>
* Create Heroku App script and workflow steps
* Tag the image for Heroku
* Push the image and grab the image ID
* Set app name and image id outputs
* Add parallel deploy script for Docker
* Scope workflow run to 'docker-' and release image to Heroku
* Update .github/workflows/staging-build-pr-docker.yml
Co-authored-by: James M. Greene <JamesMGreene@github.com>
* Exclude Docker workflow
* Cleanup Docker deploys
* Use action sha
Co-authored-by: Mike Surowiec <mikesurowiec@users.noreply.github.com>
Co-authored-by: James M. Greene <JamesMGreene@users.noreply.github.com>
Co-authored-by: James M. Greene <JamesMGreene@github.com>
* Add a Staging build workflow
* Remove all commented out code from build workflow
It will be handled in https://github.com/github/docs-engineering/issues/726
* Use pinned version of upload-artifact action
* Tweaks to build
* Minor deployment script refactoring
* Update the Staging deployment workflow
* Missed refactoring tweak
* Add relevant comments
* Update Heroku app naming convention for Actions deploy to include 'gha-' prefix
* Update Heroku app ConfigVars and SourceBlob for optional prebuilt app
* Remove obsolete 'dist/' dir from PR build artifact
See https://github.com/github/docs-internal/pull/20405
* Ensure a new enough version of npm is used
* Switch to creating a tarball for upload
* Remove obsolete 'layouts' dir from file list
* Ditch the verbosity for 'tar'... too many files
* Add tarball support to deploy
* Add esm workaround to deploy script
See https://github.com/actions/github-script/issues/168
* Temporarily ignore staging deploy workflow from workflow linter
* Update deployment to use a Heroku Build Source instead of a GitHub Actions Artifact
* Update undeploy workflow to use ESM workaround
See https://github.com/actions/github-script/issues/168
* Add 'esm' package to optionalDependencies to better support workaround
See https://github.com/actions/github-script/issues/168
* Add Slack notifications for workflow failures
* Wrap AppSetup polling in try-catch
* Improve dyno monitoring
* Rename 'script/deploy' to have a .js extension #esm
* Update script references to include the extension
* Use non-deprecated Sources API for Heroku
* Use normal quotes
* Stub in a step to mark deployment inactive after timing out
* Apply suggestions from code review
Co-authored-by: Rachael Sewell <rachmari@github.com>
Co-authored-by: Rachael Sewell <rachmari@github.com>
* Lint .yaml workflows, too
* Ignore workflow that uses non-GA-ed feature
* Update to the latest actions-linter to fix the partial-expression problem (cschleiden/github-actions-parser#18)
* Update version of actions-linter to support 'concurrency' key
* Update .github/workflows/workflow-lint.yml
* Revert casing of 'fromJson' to 'fromJSON'
* Add 'script/deploy' to enable manual deploys to Heroku
* Pass API tokens into 'deploy-to-staging' module usage
* Construct Octokit instance to pass in
* Get PR branch name and verify state
* Reorganize
* Rename option to 'octokit'
* Add missing option
* Actually use the convenience methods for convenience
* Simplify top-level script
* Top-level script revisions
* Add parse-pr-url module
* Add create-staging-app-name module
* Remove misplaced comment
* Pass in owner
* Use owner param
* More variables
* Pass owner along more
* Correct prNumber param reference
* Add WIP deploy-to-staging module
* Prevent 'scripts/' and '.github/actions-scripts/' files from being modified in open source repo
* Extract PR author earlier
* Add note about optionally supplying DOCUBOT_REPO_PAT env var
* Override Heroku env var during AppSetup creation instead of later to avoid triggering a second deploy
* Updates to deploy-to-staging module
* Lots of updates
* Add dyno start-up monitoring and warmup requests
* Ignore 'script/deploy' in the repository-references test
* Correct path to Octokit helper
* Temporarily add a 'gha-' prefix to environment names
* Log whole error if terminal. Good for Octokit errors!
* Correct Octokit preview configuration
* Add more logging around Heroku build and release
* Added more timings to log messages
* Monitor dyno states specifically from the dyno list view to avoid 404 oddities when Free dynos are dropped and non-Free dynos are added
* Don't wait for AppSetup status as it includes the Build time
* Updating logging since we don't see DeploymentStatus update messages in the UI =(
* Refactor to extract more properties from the PR object
* Add a workflow to deploy PRs to Staging
* Fix workflow description
* Add skeleton workflow and module for undeploying
* Remove commented out code
* Update undeployment module
* Add '--destroy' flag to 'script/deploy' options
* Add timeout and concurrency key for undeployment
* Add timeout and concurrency key for deployment
* Remove dangling unneeded function declaration
* Add ant-man preview for inactive deployment state setting
* Fix reference to pull request number
* Fix reference to pull request number
* Refactor to extract more properties from the PR object
* Fix reference to pull request number
* Remove workflow
* Add workflow to undeploy closed PRs from staging
* Add repository filters to jobs
* Update to using actions/github-script@4.0.2
* Pass more environment variables that affect deployments
* Add explicit .js extensions to local require in Actions workflow
* Check out the code and install deps first, of course
* Try local requires without the explicit .js extension
* Use our usual version of Octokit instead of the provided 'github' instance to avoid versioning discrepancies
* Explicitly pass in GITHUB_TOKEN to github-script
* Point to the workflow run page as a default log_url
* Exclude staging deployment workflows from the workflow linter until we can get support for the 'concurrency' key (https://github.com/cschleiden/actions-linter/issues/79)
* Remove 'gha-' prefix
* Re-enable the Actions workflow linter using the latest version
* Update to the latest actions-linter
* Update to the latest actions-linter
* Rely on secrets.FREEZE directly rather than setting a duplicate env var
* Fix workflow error by using secrets.FREEZE directly as this one doesn't actually set a duplicate env var in the first place!
* Update to latest actions-linter
* Use ${{}} expression syntax
* Readd env.FREEZE to necessary workflows since secrets cannot be checked in 'if' conditions
* Readd the comment to the GraphQL updating workflow about the FREEZE secret
* Upgrade actions-linter