Update workflows

This commit is contained in:
EstrellaXD
2023-05-05 13:52:35 +08:00
parent 73921b9b7b
commit 3a27855e09
4 changed files with 40 additions and 18 deletions

View File

@@ -3,7 +3,7 @@ name: Deploy To Dockerhub(dev)
on:
push:
tags:
- '\d+\.\d+\.\d+-beta(?:\d+)?'
- '\d+\.\d+\.\d+-beta\d+'
jobs:
test:
@@ -56,3 +56,20 @@ jobs:
estrellaxd/auto_bangumi:dev-latest
estrellaxd/auto_bangumi:${{ github.ref_name }}
file: Dockerfile
generate_release:
runs-on: ubuntu-latest
needs: [test]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Generate Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref_name }}
release_name: 🌙${{ github.ref_name }}
draft: true
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}

View File

@@ -73,17 +73,4 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha, scope=${{ github.workflow }}
cache-to: type=gha, scope=${{ github.workflow }}
telegram:
runs-on: ubuntu-latest
needs: [build]
steps:
- name: send telegram message on push
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
message: |
New release: ${{ github.event.release.title }}
Link: ${{ github.event.release.html_url }}
cache-to: type=gha, scope=${{ github.workflow }}

View File

@@ -14,8 +14,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Generate Release Draft
uses: actions/create-release@v1
- name: Generate Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.event.pull_request.title }}
release_name: 🌟${{ github.event.pull_request.title }}
@@ -23,4 +23,4 @@ jobs:
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}

18
.github/workflows/telegram.yml vendored Normal file
View File

@@ -0,0 +1,18 @@
name: Telegram Notification
on:
release:
types: [published]
jobs:
telegram:
runs-on: ubuntu-latest
steps:
- name: send telegram message on push
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
message: |
New release: ${{ github.event.release.title }}
Link: ${{ github.event.release.html_url }}