mirror of
https://github.com/huo-ju/photoprism-freebsd-port.git
synced 2025-12-11 17:31:13 +01:00
54 lines
2.2 KiB
YAML
54 lines
2.2 KiB
YAML
name: Update Latest
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
UpdateToLatest:
|
|
name: Update to Latest
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- id: getRelease
|
|
name: Fetch latest release
|
|
uses: pozetroninc/github-action-get-latest-release@master
|
|
with:
|
|
repository: photoprism/photoprism
|
|
- name: Update Makefile
|
|
run: |
|
|
export VERSION=`echo "${{ steps.getRelease.outputs.release }}"|cut -d "-" -f 1`
|
|
sed -i "s/DISTVERSION=.*/DISTVERSION= g20${VERSION}/g" Makefile
|
|
sed -i "s/GH_TAGNAME=.*/GH_TAGNAME= ${{ steps.getRelease.outputs.release }}/g" Makefile
|
|
- name: Build The Latest
|
|
uses: vmactions/freebsd-vm@v1
|
|
with:
|
|
usesh: true
|
|
prepare: |
|
|
pkg install -y gmake npm wget pkgconf git go122 portsnap ffmpeg p5-Image-ExifTool libheif vips bsddialog portconfig
|
|
mkdir -p /var/db/portsnap && portsnap --interactive auto > /dev/null
|
|
fetch https://github.com/lapo-luchini/libtensorflow1-freebsd-port/releases/download/v1.15.5_2/libtensorflow1-1.15.5_2.pkg-FreeBSD-14.0-amd64-AVX-SSE42.pkg -o /tmp/libtf.pkg
|
|
pkg add /tmp/libtf.pkg
|
|
run: |
|
|
git config --global --add safe.directory /home/runner/work/photoprism-freebsd-port/photoprism-freebsd-port
|
|
make makesum
|
|
make -j $(nproc)
|
|
make makeplist >pkg-plist
|
|
tail -n +2 pkg-plist >pkg-plist.tmp
|
|
mv pkg-plist.tmp pkg-plist
|
|
- name: Show diff
|
|
run: git diff
|
|
- name: Commit and push
|
|
uses: stefanzweifel/git-auto-commit-action@v5
|
|
with:
|
|
commit_message: "[Auto update] Update to ${{ steps.getRelease.outputs.release }}"
|
|
- name: Remote Extra Header
|
|
run: git config --unset http.https://github.com/.extraheader
|
|
- name: Create Release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
body: Photoprism ${{ steps.getRelease.outputs.release }} packages for FreeBSD
|
|
tag_name: ${{ steps.getRelease.outputs.release }}
|
|
name: ${{ steps.getRelease.outputs.release }}
|
|
token: ${{ secrets.PAT }} |