about summary refs log tree commit diff
path: root/src/doc/rustc-dev-guide/ci
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2021-03-11 01:51:56 +0900
committerGitHub <noreply@github.com>2021-03-10 11:51:56 -0500
commite33049fc64dd5fd87a9c5190326ceee5f3ef1fb0 (patch)
tree81d0d994e15b036547444834974d073561f86c64 /src/doc/rustc-dev-guide/ci
parent1d6e82fe0a0c39b0d6d904439feace9fee4360d6 (diff)
Switch from Travis to GHA (#1073)
Diffstat (limited to 'src/doc/rustc-dev-guide/ci')
-rwxr-xr-xsrc/doc/rustc-dev-guide/ci/linkcheck.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/doc/rustc-dev-guide/ci/linkcheck.sh b/src/doc/rustc-dev-guide/ci/linkcheck.sh
index d329a71642e..3d70432f5cf 100755
--- a/src/doc/rustc-dev-guide/ci/linkcheck.sh
+++ b/src/doc/rustc-dev-guide/ci/linkcheck.sh
@@ -3,22 +3,22 @@
 set -e
 set -o pipefail
 
-# https://docs.travis-ci.com/user/environment-variables/#default-environment-variables
-if [ "$TRAVIS_EVENT_TYPE" = "cron" ] ; then # running in cron job
+# https://docs.github.com/en/actions/reference/environment-variables
+if [ "$GITHUB_EVENT_NAME" = "schedule" ] ; then # running in scheduled job
   FLAGS=""
 
   echo "Doing full link check."
   set -x
 elif [ "$CI" = "true" ] ; then # running in PR CI build
-  if [ -z "$TRAVIS_COMMIT_RANGE" ]; then
-    echo "error: unexpected state: TRAVIS_COMMIT_RANGE must be non-empty in CI"
+  if [ -z "$BASE_SHA" ]; then
+    echo "error: unexpected state: BASE_SHA must be non-empty in CI"
     exit 1
   fi
 
-  CHANGED_FILES=$(git diff --name-only $TRAVIS_COMMIT_RANGE | tr '\n' ' ')
+  CHANGED_FILES=$(git diff --name-only $BASE_SHA... | tr '\n' ' ')
   FLAGS="--no-cache -f $CHANGED_FILES"
 
-  echo "Checking files changed in $TRAVIS_COMMIT_RANGE: $CHANGED_FILES"
+  echo "Checking files changed since $BASE_SHA: $CHANGED_FILES"
   set -x
 else # running locally
   COMMIT_RANGE=master...