diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c589989..821ad36 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,6 +15,7 @@ jobs: go-version: [^1] os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} + if: ${{ github.event_name != 'pull_request_target' || (contains(github.event.pull_request.labels.*.name, 'ok to test') && github.event.pull_request.state == 'open') }} env: GO111MODULE: "on" UPYUN_BUCKET: ${{ secrets.UPYUN_BUCKET }} @@ -23,6 +24,12 @@ jobs: UPYUN_SECRET: ${{ secrets.UPYUN_SECRET }} UPYUN_USERNAME: ${{ secrets.UPYUN_USERNAME }} steps: + - name: Remove 'ok to test' Label + if: ${{ github.event_name == 'pull_request_target' }} + uses: actions-ecosystem/action-remove-labels@v1.3.0 + with: + labels: 'ok to test' + - name: Install Go uses: actions/setup-go@v2 with: