From 6bb57cd591af150fb97bdedb874ed5fa3e23c1b1 Mon Sep 17 00:00:00 2001 From: jansel Date: Fri, 27 Dec 2024 03:27:41 +0100 Subject: [PATCH] Update .github/workflows/root.yml --- .github/workflows/root.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/root.yml b/.github/workflows/root.yml index d96266a..7f72ea9 100644 --- a/.github/workflows/root.yml +++ b/.github/workflows/root.yml @@ -4,6 +4,8 @@ on: push: branches: - root + schedule: + - cron: "0 0 * * *" jobs: build: @@ -24,6 +26,10 @@ jobs: java-version: 21 distribution: temurin + - name: Get current date + id: date + run: echo "::set-output name=date::$(date +'%Y-%m-%d')" + - name: Gradle Cache uses: actions/cache/restore@v4 with: @@ -57,10 +63,10 @@ jobs: password: ${{ secrets.PW }} - name: Build the Docker image - run: docker build -t pi5:8125/jansel/feixiao:latest -t pi5:8125/jansel/feixiao:${{ gitea.run_number }} . + run: docker build -t pi5:8125/jansel/feixiao:latest -t pi5:8125/jansel/feixiao:${{ steps.date.outputs.date }} . - name: Push the Docker image related to this workflow - run: docker push pi5:8125/jansel/feixiao:${{ gitea.run_number }} + run: docker push pi5:8125/jansel/feixiao:${{ steps.date.outputs.date }} - name: Push the latest Docker image run: docker push pi5:8125/jansel/feixiao:latest \ No newline at end of file