This commit is contained in:
Hex
2023-02-25 18:49:43 +08:00
parent c0363e5412
commit 20eeed7727
14 changed files with 15 additions and 381 deletions

View File

@@ -1,11 +0,0 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"

View File

@@ -1,61 +0,0 @@
name: Build image
on:
workflow_dispatch:
jobs:
buildx:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Lower case
id: string
uses: ASzc/change-string-case-action@v5
with:
string: ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: app
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/386
push: true
tags: ${{ steps.string.outputs.lowercase }}:latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: Sync README.md
uses: ms-jpq/sync-dockerhub-readme@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}
readme: "./README.md"
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache

View File

@@ -1,31 +0,0 @@
name: Check in
on:
workflow_dispatch:
workflow_run:
workflows: ["Build image"]
types:
- completed
# UTC时间对应Beijing时间 830
schedule:
- cron: "30 0 * * *"
jobs:
run:
runs-on: ubuntu-latest
container:
image: enwaiax/smzdm_bot
env:
ANDROID_COOKIE: ${{ secrets.ANDROID_COOKIE }}
TOKEN: ${{ secrets.TOKEN }}
SK: ${{ secrets.SK }}
USER_AGENT: ${{ secrets.USER_AGENT }}
PUSH_PLUS_TOKEN: ${{ secrets.PUSH_PLUS_TOKEN }}
SC_KEY: ${{ secrets.SC_KEY }}
TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }}
TG_USER_ID: ${{ secrets.TG_USER_ID }}
steps:
- name: Working
run: |
python /smzdm_bot/main.py