Skip to content

Daily task

Daily task #1211

Workflow file for this run

# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Daily task
on:
schedule:
- cron: '30 9 * * *'
workflow_dispatch: # on button click
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Run Java Application
env:
tinifyApiKey: ${{ secrets.tinifyApiKey }}
run: java -jar target/bing-wallpaper-jar-with-dependencies.jar ${tinifyApiKey}
- name: Git auto commit
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Crawl today bing wallpaper
add_options: '-A'