-
Notifications
You must be signed in to change notification settings - Fork 3
54 lines (49 loc) · 1.44 KB
/
gradle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: auto
on:
schedule:
- cron: '0 0 * * *'
repository_dispatch:
workflow_dispatch:
inputs:
ssh:
description: "SSH connection to Actions"
required: false
default: "false"
# push:
# branches: [ main ]
# pull_request:
# branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- name: run application
run: java -jar build/libs/wallpaper-1.0-SNAPSHOT.jar
- name: Commit file to github
run: |
git config --local user.email "[email protected]"
git config --local user.name "JiaWei Lee"
git add images/4k_**
git add images/bing_**
git add index.txt
git add *.json
git add *.md
git add *.db
git commit -m "auto update wallpaper"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.MY_GIT_TOKEN }}
branch: main