Browse Source

修改 action/java 设置环境的bug

liuyuqi-dellpc 3 years ago
parent
commit
74a679ca10

+ 5 - 0
README.md

@@ -17,5 +17,10 @@ GitHub action 基于 yaml 语法,超级简单,但是 github steps 构建每
 | **ubuntu-latest** or   ubuntu-18.04   ubuntu-16.04 | docker/kubect/php/python/java/**android**/zip/.net/powershell/mysql/ms   sql/nodejs/webpack/yarn/gradle/maven/ant/ |
 | macos-latest or   macos-10.15                  | php/python/go/java/yarn/git/**xcode**/android                |
 
+## 玩坏 github action
 
+github action 是微软推出一个企业级自动构建、持续集成的福利服务。但是,在国人开发者中,时隔半年多来的观察,我发现很多开发者用 github action 做了很多稀奇古怪的事情。比如:
 
+1、bilibili每日签到。
+
+2、

+ 2 - 1
android-eclipse/.github/workflows/main.yml

@@ -15,8 +15,9 @@ jobs:
     steps:
     - uses: actions/checkout@v2
     - name: set up JDK 1.8
-      uses: actions/setup-java@v1
+      uses: actions/setup-java@v2
       with:
         java-version: 1.8
+        distribution: 'adopt'
     - name: Build Debug APK
       run:

+ 2 - 1
android-studio/.github/workflows/main.yml

@@ -16,9 +16,10 @@ jobs:
       - uses: actions/checkout@v2
 
       - name: set up JDK 1.8
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v2
         with:
           java-version: 1.8
+          distribution: 'adopt'
 
       - name: Install NDK
         run: echo "y" | sudo /usr/local/lib/android/sdk/tools/bin/sdkmanager --install "ndk;21.0.6113669" --sdk_root=${ANDROID_SDK_ROOT}

+ 3 - 1
docker/.github/workflows/main.yml

@@ -12,9 +12,11 @@ jobs:
       - uses: actions/checkout@v2
       - name: Set up JDK 11
  # 这里使用java11的环境, 其他项目在github action中找到对应的语言环境就行
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v2
         with:
           java-version: 11
+          distribution: 'adopt'
+      
       - name: Build with Maven
  # 这里maven的打包命令, 其他项目修改为对应的打包命令
         run: |

+ 1 - 1
docker/Dockerfile

@@ -1,5 +1,5 @@
 FROM maven
-MAINTAINER yqh<yqh@qq.com>
+LABEL email="liuyuqi<liuyuqi.gov@msn.cn>"
 
 ENV CODE /code
 ENV WORK /code/work

+ 6 - 4
flutter/.github/workflows/main.yml

@@ -9,16 +9,18 @@ jobs:
     runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@v2
+
       - name: Setup Java JDK
-        uses: actions/setup-java@v1.3.0
+        uses: actions/setup-java@v2
         with:
-          java-version: "12.x"
+          distribution: 'adopt'
+          java-version: "8.x"
       
       - name: Flutter action
-        uses: subosito/flutter-action@v1.1.1
+        uses: subosito/flutter-action@v1.5.0
         with:
           channel: "stable"
-          flutter-version: "1.12.x"
+          flutter-version: "2.0.2"
       
       - name: Cache Dependencies
         id: cache

+ 21 - 0
ohters/.github/workflows/dl_youtube.yml

@@ -0,0 +1,21 @@
+name: "youutbe downlaoder"
+
+on: [push, pull_request]
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    steps:
+      - name: Clone repository
+        uses: actions/checkout@v2
+
+      - name: download video
+        run: |
+          git config --local user.email "xx"
+          git config --local user.name "xx"
+          git remote set-url origin https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
+          git pull --rebase
+          ./bin/youtube-dl -o "downloads/%(id)s.%(ext)s" --batch-file='./playlist.txt'
+          git add .
+          git commit -m "download youtube video"
+          git push

+ 26 - 0
ohters/.github/workflows/genshin.yml

@@ -0,0 +1,26 @@
+name: "Genshin Impact Helper"
+
+on:
+  workflow_dispatch:
+  schedule:
+    - cron: "0 22 * * *"
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+
+    steps:
+      - uses: actions/checkout@v2
+
+      - name: Set up python
+        uses: actions/setup-python@v2
+        with:
+          python-version: 3.8
+
+      - name: Run sign
+        run: |
+          pip install -r requirements.txt
+          echo "${{ secrets.COOKIE }}" | tr '#' "\n" | xargs -I {} sh -c 'echo "{}" | python3 ./genshin.py'
+
+
+

+ 8 - 0
ohters/README.md

@@ -0,0 +1,8 @@
+## other
+
+下面收集一下其他使用 GitHub action 
+
+
+米游社原神自动每日签到  https://github.com/y1ndan/genshin-impact-helper 
+
+