mirror of
https://github.com/hex-ci/smzdm_script.git
synced 2026-02-03 02:53:17 +08:00
update
This commit is contained in:
11
.github/dependabot.yml
vendored
11
.github/dependabot.yml
vendored
@@ -1,11 +0,0 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
|
||||
- package-ecosystem: "pip"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
61
.github/workflows/build.yml
vendored
61
.github/workflows/build.yml
vendored
@@ -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
|
||||
31
.github/workflows/checkin.yml
vendored
31
.github/workflows/checkin.yml
vendored
@@ -1,31 +0,0 @@
|
||||
name: Check in
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
workflow_run:
|
||||
workflows: ["Build image"]
|
||||
types:
|
||||
- completed
|
||||
|
||||
# UTC时间,对应Beijing时间 8:30
|
||||
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
|
||||
Reference in New Issue
Block a user