From 46e23c7784e1b64171e0f66eac7be47f36bc1d10 Mon Sep 17 00:00:00 2001 From: Ghlerrix Date: Sat, 2 Sep 2023 15:21:04 +0800 Subject: [PATCH] test no arg --- .github/workflows/pushUrl.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pushUrl.yml b/.github/workflows/pushUrl.yml index d39a6a40..a2537c8a 100644 --- a/.github/workflows/pushUrl.yml +++ b/.github/workflows/pushUrl.yml @@ -36,4 +36,18 @@ jobs: run: pip install requests - name: Push - run: python pushUrl.py --url ${{ secrets.URLs }} --baidu_token ${{ secrets.BAIDU_TOKEN }} --bing_api_key ${{ secrets.BING_API_KEY }} \ No newline at end of file + run: + if [ -n "${{ secrets.URLs }}" ]; then + if [ -n "${{ secrets.BAIDU_TOKEN }}" ]; then + python pushUrl.py --url ${{ secrets.URLs }} --baidu_token ${{ secrets.BAIDU_TOKEN }} + else + echo "Secret BAIDU_TOKEN does not exist." + fi + if [ -n "${{ secrets.BING_API_KEY }}" ]; then + python pushUrl.py --url ${{ secrets.URLs }} --bing_api_key ${{ secrets.BING_API_KEY }} + else + echo "Secret BING_API_KEY does not exist." + fi + else + echo "Secret URLs does not exist." + fi