From 05b66e8d294da296e983d1145e4e0817864208d9 Mon Sep 17 00:00:00 2001 From: ttionya Date: Sat, 6 Jun 2020 11:52:21 +0800 Subject: [PATCH] chore: add GitHub Actions --- .github/workflows/release.yml | 22 ++++++++++++++++++++++ .github/workflows/schedule.yml | 18 ++++++++++++++++++ .github/workflows/sync.yml | 18 ++++++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 .github/workflows/schedule.yml create mode 100644 .github/workflows/sync.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..0911636 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,22 @@ +name: 'GitHub Release' + +on: + push: + tags: + - 'v*.*.*' + - '!v*.*.*-*' + +jobs: + build: + name: Create Release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false diff --git a/.github/workflows/schedule.yml b/.github/workflows/schedule.yml new file mode 100644 index 0000000..8361711 --- /dev/null +++ b/.github/workflows/schedule.yml @@ -0,0 +1,18 @@ +name: 'schedule' + +on: + schedule: + - cron: '0 0,6,12,18 * * *' + +jobs: + gitee: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: ttionya/Repository-Sync-Hub@v1 + with: + target_repository: 'https://gitee.com/ttionya/BitwardenRS-Backup.git' + http_access_name: 'ttionya' + http_access_token: ${{ secrets.GITEE_HTTP_ACCESS_TOKEN }} diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml new file mode 100644 index 0000000..afe940a --- /dev/null +++ b/.github/workflows/sync.yml @@ -0,0 +1,18 @@ +name: 'sync' + +on: + push: + delete: + +jobs: + gitee: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: ttionya/Repository-Sync-Hub@v1 + with: + target_repository: 'https://gitee.com/ttionya/BitwardenRS-Backup.git' + http_access_name: 'ttionya' + http_access_token: ${{ secrets.GITEE_HTTP_ACCESS_TOKEN }}