images/.forgejo/workflows/ente.yaml

48 lines
1.3 KiB
YAML
Raw Permalink Normal View History

2024-05-15 14:38:48 +00:00
---
name: Image builds
on:
2024-05-15 15:58:55 +00:00
schedule:
- cron: "21 2 * * *"
2024-05-15 14:38:48 +00:00
push:
branches:
- main
2024-05-15 15:58:55 +00:00
paths:
- ".forgejo/workflows/ente.yaml"
- "ente/**"
2024-05-15 14:38:48 +00:00
jobs:
build-ente-images:
runs-on: ubuntu-latest
2024-05-18 17:25:44 +00:00
strategy:
matrix:
app:
- photos
- cast
2024-05-15 14:38:48 +00:00
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: code.icb4dc0.de
username: prskr
password: ${{ secrets.CONTAINER_REGISTRY_TOKEN }}
- name: Fetch latest ente photos tag
run: |
echo "ENTE_PHOTOS_VERSION=$(gh release list -R ente-io/ente --exclude-pre-releases --exclude-drafts --jq '.[] | select(.tagName | startswith("photos")) | .tagName | sub("photos-";"")' --json 'tagName' --limit 10 | head -n 1)" >> "$GITHUB_ENV"
2024-05-15 14:38:48 +00:00
env:
GH_TOKEN: ${{ secrets.RENOVATE_GITHUB_TOKEN }}
2024-05-15 15:58:55 +00:00
- name: Build and push ente web
uses: docker/build-push-action@v6
2024-05-15 15:58:55 +00:00
with:
context: "./ente/web"
push: true
2024-05-18 17:25:44 +00:00
tags: code.icb4dc0.de/infrastructure/images/ente/${{ matrix.app }}:${{ env.ENTE_PHOTOS_VERSION }}
2024-05-15 15:58:55 +00:00
build-args: |
ENTE_BRANCH=photos-${{ env.ENTE_PHOTOS_VERSION }}
2024-05-18 17:25:44 +00:00
ENTE_APP=${{ matrix.app }}