Merge branch 'main' of https://github.com/varun-raj/immich-power-tools into santa-is-coming
This commit is contained in:
commit
5692aac739
3 files changed
+31
-9
No files matched your search
@@ -7,6 +7,8 @@ on:
|
||||
|
||||
jobs:
|
||||
release:
|
||||
# Only run on the original repository, not forks
|
||||
if: ${{ github.repository_owner == 'varun-raj' }}
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
@@ -32,19 +34,34 @@ jobs:
|
||||
contents: read
|
||||
packages: write
|
||||
needs: release
|
||||
if: needs.release.outputs.new-release-published == 'true'
|
||||
if: always() && !failure()
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: docker/metadata-action@v5
|
||||
name: Docker meta
|
||||
id: meta
|
||||
with:
|
||||
images: |
|
||||
ghcr.io/${{ github.repository }}
|
||||
tags: |
|
||||
type=raw,value=latest,enable=${{ github.repository_owner != 'varun-raj' || needs.release.outputs.new-release-published == 'true' }}
|
||||
type=semver,pattern={{major}}.{{minor}}.{{patch}},enable=${{ github.repository_owner == 'varun-raj' && needs.release.outputs.new-release-published == 'true' }}
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
- uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build and push Docker image
|
||||
run: |
|
||||
echo VERSION=${{ needs.release.outputs.new-release-version }} >> .env
|
||||
docker build -t ghcr.io/${{ github.repository }}:${{ needs.release.outputs.new-release-version }} \
|
||||
-t ghcr.io/${{ github.repository }}:latest .
|
||||
docker push ghcr.io/${{ github.repository }}:latest
|
||||
docker push ghcr.io/${{ github.repository }}:${{ needs.release.outputs.new-release-version }}
|
||||
- name: Build and push
|
||||
id: docker-build
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
build-args: |
|
||||
VERSION=${{ needs.release.outputs.new-release-version || 'dev' }}
|
||||
@@ -20,6 +20,11 @@ RUN npm run build
|
||||
# Production image, copy all the files and run next
|
||||
FROM node:18-alpine AS runner
|
||||
WORKDIR /app
|
||||
# Define a build argument
|
||||
ARG VERSION=dev
|
||||
|
||||
# Set the build argument as an environment variable
|
||||
ENV VERSION=$VERSION
|
||||
|
||||
ENV NODE_ENV=production
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "immich-power-tools",
|
||||
"version": "0.8.0",
|
||||
"version": "0.9.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
|
||||
Reference in new issue
Block a user