Skip to content

AutoFilm v1.2.4

AutoFilm v1.2.4 #5

Workflow file for this run

name: AutoFilm Release
on:
push:
branches:
- main
paths:
- app/version.py
jobs:
Get-Version:
runs-on: ubuntu-latest
outputs:
app_version: ${{ steps.version.outputs.app_version }}
steps:
- name: Clone Repository
uses: actions/checkout@v4
- name: APP Version
id: version
run: |
APP_VERSION=$(cat app/version.py | sed -ne 's/APP_VERSION\s=\s"v\(.*\)"/\1/gp')
echo "检测到版本号为 $APP_VERSION"
echo "app_version=$APP_VERSION" >> "$GITHUB_OUTPUT"
Release-Docker-Builder:
name: Build Docker Image
needs: [ Get-Version ]
uses: ./.github/workflows/docker-builder.yaml
with:
APP_VERSION: ${{ needs.Get-Version.outputs.app_version }}
IS_LATEST: true
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
Create-Release:
permissions: write-all
runs-on: ubuntu-latest
needs: [ Get-Version, Release-Docker-Builder ]
steps:
- name: Create Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ needs.Get-Version.outputs.app_version }}
release_name: v${{ needs.Get-Version.outputs.app_version }}
body: ${{ github.event.commits[0].message }}
draft: false
prerelease: false