From 497f065a63885462d46c6755025208430ab8eb15 Mon Sep 17 00:00:00 2001 From: kriss <462679766@qq.com> Date: Tue, 10 Oct 2023 17:12:30 +0800 Subject: [PATCH] add keep actions run --- .github/workflows/keep-actions-running.yml | 35 ++++++++++++++++++++++ composer.json | 6 ++-- 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/keep-actions-running.yml diff --git a/.github/workflows/keep-actions-running.yml b/.github/workflows/keep-actions-running.yml new file mode 100644 index 0000000..3edce88 --- /dev/null +++ b/.github/workflows/keep-actions-running.yml @@ -0,0 +1,35 @@ +name: Keep Actions Running + +on: + schedule: + - cron: '0 0 1 * *' + workflow_dispatch: + +jobs: + update: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + ref: main + + - name: Get current time + uses: josStorer/get-current-time@v2 + with: + format: "YYYY/MM/DD HH:mm:ss.SSS" + id: current-time + + - name: Update Json File + uses: restackio/update-json-file-action@v2.0 + with: + file: composer.json + fields: "{\"config.github-actions-date\": \"${{ steps.current-time.outputs.time }}\"}" + + - name: Commit updated CHANGELOG + uses: stefanzweifel/git-auto-commit-action@v5 + with: + branch: main + commit_message: keep actions running + file_pattern: composer.json diff --git a/composer.json b/composer.json index 3ca4bfa..17218ee 100644 --- a/composer.json +++ b/composer.json @@ -3,11 +3,13 @@ "type": "library", "license": "MIT", "description": "docker for webman app", - "require": { - }, + "require": {}, "autoload": { "psr-4": { "Kriss\\WebmanDocker\\": "src" } + }, + "config": { + "github-actions-date": "2023-10-10T09:09:41.993Z" } } \ No newline at end of file