Skip to content

Commit

Permalink
Create commit-delete-nginx.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
nap0o authored Dec 29, 2023
1 parent 6f0b42c commit a969da6
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/commit-delete-nginx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Delete Commit on nginx

on:
workflow_dispatch:

env:
TZ: Asia/Shanghai

jobs:
Redeploy:
name: Delete Commit on nginx

runs-on: ubuntu-latest

steps:
- uses: actions/[email protected]
with:
fetch-depth: 1

- name: Delete workflow runs
uses: MajorScruffy/[email protected]
with:
repository: ${{ secrets.REPOSITORY_GITHUB }} # replace this with your own repository such as >> owner/repo
older-than-seconds: 59 # remove all workflow runs older than 1 day >> 24*60*60=86400
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }}

- name: Delete Commit
run: |
git checkout --orphan tmp_work
git branch -d nginx
echo "DATE=${DATE}" >> $GITHUB_ENV
- name: Upload to repository
uses: stefanzweifel/[email protected]
with:
commit_message: Auto commit by Github Actions, ${{ env.DATE }}
create_branch: true
branch: nginx
push_options: --force


0 comments on commit a969da6

Please sign in to comment.