From 27c3481ea445823dca65225f90a7de560dce5200 Mon Sep 17 00:00:00 2001 From: Alex Chen Date: Thu, 9 Jan 2020 01:27:44 +0800 Subject: [PATCH] build: fix CI for forks and related docs (#3847) --- .github/workflows/build.yml | 12 ++++++++---- CONTRIBUTING.md | 8 ++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c85b8d771..f902c4e99 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -104,7 +104,8 @@ jobs: - name: Checkout uses: actions/checkout@v1 with: - path: ./src/github.com/${{ github.repository }} + # Checkout into a fixed path to avoid import path problems on go < 1.11 + path: ./src/github.com/rclone/rclone - name: Install Go uses: actions/setup-go@v1 @@ -201,7 +202,8 @@ jobs: env: RCLONE_CONFIG_PASS: ${{ secrets.RCLONE_CONFIG_PASS }} # working-directory: '$(modulePath)' - if: matrix.deploy && github.head_ref == '' + # Deploy binaries if enabled in config && not a PR && not a fork + if: matrix.deploy && github.head_ref == '' && github.repository == 'rclone/rclone' xgo: timeout-minutes: 60 @@ -213,7 +215,8 @@ jobs: - name: Checkout uses: actions/checkout@v1 with: - path: ./src/github.com/${{ github.repository }} + # Checkout into a fixed path to avoid import path problems on go < 1.11 + path: ./src/github.com/rclone/rclone - name: Set environment variables shell: bash @@ -247,4 +250,5 @@ jobs: make circleci_upload env: RCLONE_CONFIG_PASS: ${{ secrets.RCLONE_CONFIG_PASS }} - if: github.head_ref == '' + # Upload artifacts if not a PR && not a fork + if: github.head_ref == '' && github.repository == 'rclone/rclone' diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c62f13b12..51c81d760 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -82,13 +82,9 @@ You patch will get reviewed and you might get asked to fix some stuff. If so, then make the changes in the same branch, squash the commits, rebase it to master then push it to GitHub with `--force`. -## Enabling CI for your fork ## +## CI for your fork ## -The CI config files for rclone have taken care of forks of the project, so you can enable CI for your fork repo easily. - -rclone currently uses [Travis CI](https://travis-ci.org/), [AppVeyor](https://ci.appveyor.com/), and -[Circle CI](https://circleci.com/) to build the project. To enable them for your fork, simply go into their -websites, find your fork of rclone, and enable building there. +rclone currently uses [GitHub Actions](https://github.com/rclone/rclone/actions) to build and test the project, which should be automatically available for your fork too from the `Actions` tab in your repository. ## Testing ##