-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #76 from Gaojianli/main
The auto-update/build workflows
- Loading branch information
Showing
6 changed files
with
178 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
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: 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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Create Binary Pkg | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
build_14: | ||
name: Build for FreeBSD 14 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build PKG | ||
uses: vmactions/freebsd-vm@v1 | ||
with: | ||
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 package | ||
python3.11 -c "import glob, os; [os.rename(f, f.replace('.pkg', '-FreeBSD-' + os.uname().release + '.pkg')) for f in glob.glob('work/pkg/*.pkg')]" | ||
- name: Upload build artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: freebsd-14 | ||
path: | | ||
work/pkg/*.pkg | ||
build_13: | ||
name: Build for FreeBSD 13 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build PKG | ||
uses: vmactions/freebsd-vm@v1 | ||
with: | ||
release: "13.3" | ||
prepare: | | ||
pkg install -y gmake npm wget pkgconf git go122 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-13.2-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 package | ||
python3.11 -c "import glob, os; [os.rename(f, f.replace('.pkg', '-FreeBSD-' + os.uname().release + '.pkg')) for f in glob.glob('work/pkg/*.pkg')]" | ||
- name: Upload build artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: freebsd-13 | ||
path: | | ||
work/pkg/*.pkg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Release | ||
|
||
on: | ||
workflow_dispatch: | ||
release: | ||
types: | ||
- published | ||
workflow_run: | ||
workflows: ["Update Latest"] | ||
types: [completed] | ||
|
||
|
||
jobs: | ||
Build_Packages: | ||
name: Build Packages | ||
secrets: inherit | ||
permissions: | ||
contents: write | ||
checks: write | ||
actions: read | ||
issues: read | ||
packages: write | ||
pull-requests: read | ||
repository-projects: read | ||
statuses: read | ||
uses: ./.github/workflows/build_pkg.yml | ||
Upload_Artifacts: | ||
name: Upload to release artifacts | ||
needs: Build_Packages | ||
permissions: | ||
contents: write | ||
checks: write | ||
actions: read | ||
issues: read | ||
packages: write | ||
pull-requests: read | ||
repository-projects: read | ||
statuses: read | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: freebsd-14 | ||
path: target/ | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: freebsd-13 | ||
path: target/ | ||
- uses: alexellis/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
asset_paths: '[ "target/*.pkg" ]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# $FreeBSD$ | ||
|
||
PORTNAME= photoprism | ||
DISTVERSION= g20240711 | ||
DISTVERSION= g20240915 | ||
CATEGORIES= www | ||
|
||
MAINTAINER= [email protected] | ||
|
@@ -26,12 +26,12 @@ EXTRACT_DEPENDS= ${RUN_DEPENDS} \ | |
|
||
BUILD_DEPENDS= ${EXTRACT_DEPENDS} | ||
|
||
USES= gmake go:1.21,modules python:3.6+,build | ||
USES= gmake go:1.22,modules python:3.6+,build | ||
|
||
USE_GITHUB= yes | ||
GH_ACCOUNT= photoprism | ||
GH_PROJECT= photoprism | ||
GH_TAGNAME= 240711-2197af848 | ||
GH_TAGNAME= 240915-e1280b2fb | ||
|
||
USE_RC_SUBR= photoprism | ||
PHOTOPRISM_DATA_DIR= /var/db/photoprism | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
TIMESTAMP = 1721639281 | ||
SHA256 (photoprism-photoprism-g20240711-240711-2197af848_GH0.tar.gz) = 34b29308f64a50d2dbf482ccacbb7b5357e50f97e74a7ce0ee295c0a3bef695a | ||
SIZE (photoprism-photoprism-g20240711-240711-2197af848_GH0.tar.gz) = 64940285 | ||
TIMESTAMP = 1727609221 | ||
SHA256 (photoprism-photoprism-g20240915-240915-e1280b2fb_GH0.tar.gz) = 11dd12b493f18f44e052ef71b1f29b7b5a4237fc27df3e8afb23c08f2989e369 | ||
SIZE (photoprism-photoprism-g20240915-240915-e1280b2fb_GH0.tar.gz) = 65012389 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters