From 01cf4eb29ffc83b5ee4cbe8a71385a5dfd5616be Mon Sep 17 00:00:00 2001 From: IceCodeNew <32576256+IceCodeNew@users.noreply.github.com> Date: Tue, 23 Aug 2022 16:53:58 +0800 Subject: [PATCH] Test PR using GitHub Actions (#1115) --- .github/workflows/build.yml | 3 --- .github/workflows/test-pr.yml | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/test-pr.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 74f1c3fc..43fcd373 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,8 +1,5 @@ name: Build dlc.dat on: - pull_request: - branches: - - master push: branches: - master diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml new file mode 100644 index 00000000..96fd18c6 --- /dev/null +++ b/.github/workflows/test-pr.yml @@ -0,0 +1,32 @@ +name: Test PR +on: + pull_request: + branches: + - master +jobs: + build: + name: Build + runs-on: ubuntu-latest + + steps: + - name: Setup Go + uses: actions/setup-go@v3 + with: + go-version: 1.18 + + - name: Set variables + run: | + echo "RELEASE_NAME=$(date +%Y%m%d%H%M%S)" >> $GITHUB_ENV + echo "TAG_NAME=$(date +%Y%m%d%H%M%S)" >> $GITHUB_ENV + shell: bash + + - name: Checkout codebase + uses: actions/checkout@v3 + with: + path: code + + - name: Build dlc.dat file + run: | + cd code || exit 1 + go run ./ --outputdir=../ --exportlists=category-ads-all,tld-cn,cn,tld-\!cn,geolocation-\!cn,apple,icloud + cd ../ && rm -rf code