一分钟搭建影视站,支持Docker等部署方式
ci: simplify workflow Signed-off-by: JohnsonRan <[email protected]>
JohnsonRane200296c6b7f
diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.ymlindex cdec817..ae1b828 100644--- a/.github/workflows/docker-build.yml+++ b/.github/workflows/docker-build.yml@@ -1,4 +1,4 @@-name: 'Build LibreTV image'+name: Build LibreTV imageon:workflow_run:@@ -9,22 +9,15 @@ on:jobs:build:- name: 'Build LibreTV image'+ name: Build LibreTV imageruns-on: ubuntu-latest- if: >- (github.event_name == 'workflow_dispatch')- || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success'- && (github.repository == 'LibreSpark/LibreTV' || github.repository == 'bestZwei/libretv'))- env:- DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}+ if: github.event.workflow_run.conclusion == 'success' && (github.repository == 'LibreSpark/LibreTV' || github.repository == 'bestZwei/libretv')steps:- - name: 'Check out repository'- uses: actions/[email protected]- with:- fetch-depth: 0+ - name: Check out repository+ uses: actions/checkout@v4- - name: 'Set Docker image tag based on repository'+ - name: Set Docker image tag based on repositoryid: set-tagrun: |if [ "${{ github.repository }}" = "LibreSpark/LibreTV" ]; then@@ -33,23 +26,23 @@ jobs:echo "IMAGE_TAG=libretv-beta:latest" >> $GITHUB_OUTPUTfi- - name: 'Set up Docker QEMU'- uses: docker/[email protected]+ - name: Set up Docker QEMU+ uses: docker/setup-qemu-action@v3- - name: 'Set up Docker Buildx'- uses: docker/[email protected]+ - name: Set up Docker Buildx+ uses: docker/setup-buildx-action@v3- - name: 'Login to DockerHub'- uses: docker/[email protected]+ - name: Login to DockerHub+ uses: docker/login-action@v3with:username: ${{ secrets.DOCKER_USERNAME }}password: ${{ secrets.DOCKER_PASSWORD }}- - name: 'Build and push LibreTV image'+ - name: Build and push LibreTV imageuses: docker/[email protected]with:context: .file: Dockerfilepush: true- tags: "${{ env.DOCKER_USERNAME }}/${{ steps.set-tag.outputs.IMAGE_TAG }}"+ tags: "${{ secrets.DOCKER_USERNAME }}/${{ steps.set-tag.outputs.IMAGE_TAG }}"platforms: linux/amd64,linux/arm64/v8\ No newline at end of filediff --git a/.github/workflows/sync.yml b/.github/workflows/sync.ymlindex 312b13d..57ec15c 100644--- a/.github/workflows/sync.yml+++ b/.github/workflows/sync.yml@@ -5,7 +5,7 @@ permissions:on:schedule:- - cron: "0 4 * * *" # At 04:00, every day+ - cron: "0 4 * * *" # At 12PM UTC+8workflow_dispatch:jobs:@@ -13,41 +13,21 @@ jobs:name: Sync latest commits from upstream reporuns-on: ubuntu-latestif: ${{ github.event.repository.fork }}-- # 添加全局环境变量,确保所有Git操作使用相同的身份- env:- GIT_AUTHOR_NAME: github-actions[bot]- GIT_AUTHOR_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com- GIT_COMMITTER_NAME: github-actions[bot]- GIT_COMMITTER_EMAIL: 41898282+github-actions[bot]@users.noreply.github.comsteps:# Step 1: run a standard checkout action- name: Checkout target repo- uses: actions/checkout@v3- with:- # 设置 token 以防止触发其他工作流- token: ${{ secrets.GITHUB_TOKEN }}-- # Configure Git to disable email notifications- - name: Configure Git- run: |- git config --global user.name "github-actions[bot]"- git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"- git config --global --add notifications.enabled false+ uses: actions/checkout@v4# Step 2: run the sync action- name: Sync upstream changesid: sync- uses: aormsby/[email protected]+ uses: aormsby/[email protected]with:upstream_sync_repo: LibreSpark/LibreTVupstream_sync_branch: maintarget_sync_branch: maintarget_repo_token: ${{ secrets.GITHUB_TOKEN }}- git_config_user: github-actions[bot]- git_config_email: 41898282+github-actions[bot]@users.noreply.github.com- test_mode: false- name: Sync checkif: failure()