forked from fscarmen/warp-sh
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto renew by Github Actions, 2024/09/24 16:25:47
- Loading branch information
0 parents
commit 3d2f8f5
Showing
2 changed files
with
730 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Sync README.md | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 16 * * *' | ||
|
||
jobs: | ||
Sync: | ||
|
||
name: Sync README.md | ||
|
||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Compare with Gitlab | ||
run: | | ||
GITLAB=$(wget -qO- https://gitlab.com/fscarmen/warp/-/raw/main/README.md | md5sum) | ||
GITHUB=$(wget -qO- https://raw.githubusercontent.com/fscarmen/warp-sh/main/README.md | md5sum) | ||
if [ "$GITLAB" != "$GITHUB" ]; then | ||
wget -O README.md https://gitlab.com/fscarmen/warp/-/raw/main/README.md | ||
git checkout --orphan tmp_work | ||
git branch -d ${GITHUB_REF#refs/heads/} | ||
echo "DATE=$(date "+%Y/%m/%d %H:%M:%S")" >> $GITHUB_ENV | ||
fi | ||
- name: Update README.md | ||
if: ${{ env.DATE != '' }} | ||
uses: stefanzweifel/[email protected] | ||
with: | ||
commit_message: Auto renew by Github Actions, ${{ env.DATE }} | ||
create_branch: true | ||
branch: main | ||
push_options: --force | ||
|
||
- name: Delete old workflow runs | ||
uses: MajorScruffy/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
repository: ${{ github.repository }} | ||
older-than-seconds: 3600 |
Oops, something went wrong.