From 4a2dc7779b26b996dafc2619e4f029366ad6f2bf Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Wed, 13 Jan 2021 16:17:56 +0100 Subject: [PATCH] Default branch rename Helps with https://github.com/whatwg/meta/issues/174. --- .github/workflows/build.yaml | 8 ++++---- build.sh | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 334c957..1e68b4e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -2,10 +2,10 @@ name: Build on: pull_request: branches: - - master + - main push: branches: - - master + - main jobs: build: name: Build @@ -34,13 +34,13 @@ jobs: mkdir output bash ci-build/docker-run.sh "$GITHUB_WORKSPACE/html" output - name: Docker login - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} uses: docker/login-action@v1 with: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_TOKEN }} - name: Docker push - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} run: | docker tag "$IMAGE_NAME" "$IMAGE_NAME:$GITHUB_SHA" docker tag "$IMAGE_NAME" "$IMAGE_NAME:latest" diff --git a/build.sh b/build.sh index 8edeb77..6fdf710 100755 --- a/build.sh +++ b/build.sh @@ -191,7 +191,7 @@ function checkHTMLBuildIsUpToDate { fi # TODO: `git remote get-url origin` is nicer, but new in Git 2.7. ORIGIN_URL=$(git config --get remote.origin.url) - GIT_FETCH_ARGS+=( "$ORIGIN_URL" master) + GIT_FETCH_ARGS+=( "$ORIGIN_URL" main) git fetch "${GIT_FETCH_ARGS[@]}" NEW_COMMITS=$(git rev-list --count HEAD..FETCH_HEAD) if [[ $NEW_COMMITS != "0" ]]; then @@ -203,7 +203,7 @@ function checkHTMLBuildIsUpToDate { echo echo "To update, run this command:" echo - echo " git pull --rebase origin master" + echo " git pull --rebase origin main" echo echo "This check can be bypassed with the --no-update option." exit 1