Skip to content

Commit

Permalink
edit release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
martabal committed Mar 12, 2024
1 parent 8137ba3 commit 72cdc62
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 69 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ on:
branches: ["main"]
pull_request:
branches: ["main"]
repository_dispatch:
types: [trigger_build]
schedule:
- cron: "0 12 * * 3"

Expand Down Expand Up @@ -60,8 +58,6 @@ jobs:
echo "Generate tags"
if [ "${{ inputs.version }}" != '' ]; then
immich_version="${{ inputs.version }}"
elif [ -n "${{ github.event.client_payload.message }}" ]; then
immich_version="${{ github.event.client_payload.message }}"
else
immich_version=$(curl -sL https://api.github.com/repos/immich-app/immich/releases/latest | jq -r '.tag_name')
fi
Expand Down Expand Up @@ -102,7 +98,7 @@ jobs:
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GH_TOKEN }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push docker images
uses: docker/build-push-action@v5
Expand Down
40 changes: 17 additions & 23 deletions .github/workflows/external-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ name: External trigger
on:
schedule:
- cron: "*/20 * * * *"
push:
branches: ["main"]

permissions:
contents: read
pages: write
contents: write
actions: write

jobs:
check_new_version:
Expand Down Expand Up @@ -47,31 +49,23 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Create new release for AIO
- name: Create tag
run: |
git config --global user.email "49699333+dependabot[bot]@users.noreply.github.com"
git config --global user.name "dependabot[bot]"
git tag "${{ needs.check_new_version.outputs.immich_version }}"
git push --tags
curl \
-X POST \
-H "Authorization: token ${{ secrets.GH_TOKEN }}" \
--data "{\"tag_name\": \"${{ needs.check_new_version.outputs.immich_version }}\",
\"target_commitish\": \"main\",
\"name\": \"${{ needs.check_new_version.outputs.immich_version }}\",
\"generate_release_notes\": true,
\"body\": \"Read Immich release notes [here](https://github.com/immich-app/immich/releases/tag/${{ needs.check_new_version.outputs.immich_version }})\",
\"draft\": false,
\"prerelease\": false}" \
"https://api.github.com/repos/${{ github.repository_owner }}/${{ github.event.repository.name }}/releases"
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create ${{ needs.check_new_version.outputs.immich_version }} \
--generate-notes \
--notes "Read Immich release notes [here](https://github.com/immich-app/immich/releases/tag/${{ needs.check_new_version.outputs.immich_version }})"
- name: Trigger workflow
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
curl \
-X POST \
-H "Accept: application/vnd.github.everest-preview+json" \
-H "Authorization: token ${{ secrets.GH_TOKEN }}" \
--data '{"event_type": "trigger_build", "client_payload": {"message": "'"${{ needs.check_new_version.outputs.immich_version }}"'"}}' \
https://api.github.com/repos/${{ github.repository_owner }}/${{ github.event.repository.name }}/dispatches
gh workflow run docker.yml -f version=${{ needs.check_new_version.outputs.immich_version }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

[Immich](https://immich.app/) is a high performance self-hosted photo and video backup solution.

[![immich](https://user-images.githubusercontent.com/27055614/182044984-2ee6d1ed-c4a7-4331-8a4b-64fcde77fe1f.png)](https://immich.app/)
[![immich](https://avatars.githubusercontent.com/u/109746326?s=200&v=4)](https://immich.app/)

## What is it ?

Expand Down
44 changes: 4 additions & 40 deletions templates/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -37,38 +37,20 @@ RUN \
autoconf \
bc \
build-essential \
cpanminus \
git \
libany-uri-escape-perl \
libcapture-tiny-perl \
libexif-dev \
libexpat1-dev \
libffi-checklib-perl \
libfile-chdir-perl \
libfile-slurper-perl \
libfile-which-perl \
libglib2.0-dev \
libgsf-1-dev \
libheif-dev \
libio-socket-ssl-perl \
libjpeg-dev \
libjxl-dev \
libltdl-dev \
libmojolicious-perl \
libnet-ssleay-perl \
liborc-0.4-dev \
libpath-tiny-perl \
libpkgconfig-perl \
librsvg2-dev \
libsort-versions-perl \
libspng-dev \
libterm-table-perl \
libtest-fatal-perl \
libtest-needs-perl \
libtest-warnings-perl \
libtest2-suite-perl \
libtool \
libtry-tiny-perl \
libwebp-dev \
meson \
pkg-config \
Expand All @@ -93,6 +75,7 @@ RUN \
libgomp1 \
libgsf-1-114 \
libheif1 \
libio-compress-brotli-perl \
libjxl0.7 \
liblcms2-2 \
liblqr-1-0 \
Expand Down Expand Up @@ -175,7 +158,6 @@ RUN \
./build-libraw.sh && \
./build-imagemagick.sh && \
./build-libvips.sh && \
./build-perllib-compress-brotli.sh && \
echo "**** download geocoding data ****" && \
curl -o \
/tmp/cities500.zip -L \
Expand Down Expand Up @@ -203,7 +185,7 @@ RUN \
/tmp/immich --strip-components=1 && \
echo "**** build server ****" && \
cd /tmp/immich/server && \
npm ci && \
npm ci --no-fund --no-update-notifier && \
rm -rf node_modules/@img/sharp-libvips* && \
rm -rf node_modules/@img/sharp-linuxmusl-x64 && \
cp -r \
Expand All @@ -225,11 +207,11 @@ RUN \
/app/immich/server && \
echo "**** build open-api ****" && \
cd /tmp/immich/open-api/typescript-sdk && \
npm ci && \
npm ci --no-fund --no-update-notifier && \
npm run build && \
echo "**** build web ****" && \
cd /tmp/immich/web && \
npm ci && \
npm ci --no-fund --no-update-notifier && \
npm run build && \
cp -a \
build/* \
Expand Down Expand Up @@ -289,38 +271,21 @@ RUN \
autoconf \
bc \
build-essential \
cpanminus \
git \
libany-uri-escape-perl \
libcapture-tiny-perl \
libexif-dev \
libexpat1-dev \
libffi-checklib-perl \
libfile-chdir-perl \
libfile-slurper-perl \
libfile-which-perl \
libglib2.0-dev \
libgsf-1-dev \
libheif-dev \
libio-socket-ssl-perl \
libjpeg-dev \
libjxl-dev \
libltdl-dev \
libmojolicious-perl \
libnet-ssleay-perl \
liborc-0.4-dev \
libpath-tiny-perl \
libpkgconfig-perl \
librsvg2-dev \
libsort-versions-perl \
libspng-dev \
libterm-table-perl \
libtest-fatal-perl \
libtest-needs-perl \
libtest-warnings-perl \
libtest2-suite-perl \
libtool \
libtry-tiny-perl \
libwebp-dev \
meson \
pkg-config \
Expand All @@ -338,7 +303,6 @@ RUN \
/usr/share/keyrings/intel-graphics.gpg \
{% endif -%}
/root/.cache \
/root/.cpanm \
/root/.npm \
/tmp/* \
/usr/share/keyrings/nodesource.gpg \
Expand Down

0 comments on commit 72cdc62

Please sign in to comment.