-
Notifications
You must be signed in to change notification settings - Fork 15
54 lines (52 loc) · 2.18 KB
/
auto_update.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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 }}