From 0e76f0a240f0de6df2f6dcbc321598714727da0e Mon Sep 17 00:00:00 2001 From: Libo Huang Date: Wed, 14 Dec 2022 17:57:22 +0800 Subject: [PATCH] update workflow --- .github/workflows/test.yml | 7 +++++++ 1 file changed, 7 insertions(+) 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: