Compare commits

...

21 Commits

Author SHA1 Message Date
cedcae02ce update astro
All checks were successful
renovate / renovate (push) Successful in 1m41s
release-image / release (push) Successful in 2m13s
2025-06-09 12:38:55 -05:00
4ef6e85ed9 change url
Some checks failed
renovate / renovate (push) Has been cancelled
2025-06-09 12:37:04 -05:00
1ad039e9ff add workflow to tag old issues
All checks were successful
renovate / renovate (push) Successful in 1m14s
2025-06-09 12:32:34 -05:00
034d6d1120 downgrade priority
All checks were successful
renovate / renovate (push) Successful in 1m40s
2025-06-08 23:28:42 -05:00
2c436100c5 fix topic
All checks were successful
renovate / renovate (push) Successful in 1m14s
2025-06-08 23:23:57 -05:00
6ea1467653 change ntfy workflwo
All checks were successful
renovate / renovate (push) Successful in 2m30s
2025-06-08 23:02:40 -05:00
1ba76ab5cf change log level
All checks were successful
renovate / renovate (push) Successful in 1m22s
2025-06-08 22:29:17 -05:00
478482ab01 remove test
Some checks failed
release-image-gitea / release (push) Failing after 21m20s
renovate / renovate (push) Successful in 10m9s
2025-06-08 22:19:00 -05:00
f1e3e4ecaa change workflow
All checks were successful
renovate / renovate (push) Successful in 1m36s
2025-06-08 22:12:43 -05:00
05eb8a092c change command
Some checks failed
renovate / renovate (push) Successful in 5m33s
release-image-gitea / release (push) Failing after 11m33s
2025-06-08 21:54:10 -05:00
633e374a17 change tags
Some checks failed
renovate / renovate (push) Has been cancelled
2025-06-08 21:47:30 -05:00
cd75440a6d remove command
Some checks failed
renovate / renovate (push) Successful in 1m7s
release-image-gitea / release (push) Failing after 14m4s
2025-06-08 20:50:39 -05:00
3354975e2e remove command
Some checks failed
renovate / renovate (push) Has been cancelled
2025-06-08 20:49:53 -05:00
1ffe933d6e change build arg
Some checks failed
renovate / renovate (push) Successful in 1m26s
release-image-gitea / release (push) Failing after 1m24s
2025-06-08 20:45:47 -05:00
90318aad14 change build arg
Some checks failed
renovate / renovate (push) Successful in 1m15s
release-image-gitea / release (push) Failing after 1m19s
2025-06-08 20:39:46 -05:00
e454a510c6 change
All checks were successful
renovate / renovate (push) Successful in 1m4s
2025-06-08 20:35:06 -05:00
a6d3ec5052 change
All checks were successful
renovate / renovate (push) Successful in 1m8s
2025-06-08 20:33:24 -05:00
1d134d43da remove oci
All checks were successful
renovate / renovate (push) Successful in 1m11s
2025-06-08 20:30:25 -05:00
54c7c9e259 remove oci
All checks were successful
renovate / renovate (push) Successful in 1m9s
2025-06-08 20:26:29 -05:00
0d8cf28be4 modify daemon
All checks were successful
renovate / renovate (push) Successful in 1m16s
2025-06-08 20:24:03 -05:00
d78a8d8c45 use different registry
All checks were successful
renovate / renovate (push) Successful in 1m7s
2025-06-08 20:19:32 -05:00
7 changed files with 143 additions and 57 deletions

View File

@@ -1,3 +1,6 @@
.DS_Store
.astro
.gitea
.vscode
node_modules
dist

View File

@@ -1,4 +1,4 @@
name: release-image-gitea
name: release-image
on:
push:
@@ -41,6 +41,9 @@ jobs:
driver-opts: |
namespace=gitea
qemu.install=true
buildkitd-config-inline: |
[registry."hub.docker.com"]
mirrors = ["harbor.alexlebens.net/proxy-hub.docker/"]
- name: Available Platforms
run: echo ${{ steps.buildx.outputs.platforms }}
@@ -50,32 +53,12 @@ jobs:
uses: docker/metadata-action@v5
with:
tags: |
type=schedule
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
images: |
${{ vars.REPOSITORY_HOST }}/${{ gitea.repository }}
${{ vars.REGISTRY_HOST }}/images/site-profile
- name: Build and Export to Docker
uses: docker/build-push-action@v6
with:
context: .
load: true
tags: ${{ env.TEST_TAG }}
file: ./Dockerfile
build-args: |
REGISTRY=harbor.alexlebens.net/v2/proxy-registry-1.docker.io/
- name: Test
run: |
docker run --rm ${{ env.TEST_TAG }}
- name: Build and Push Image
uses: docker/build-push-action@v6
with:
@@ -85,14 +68,31 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
file: ./Dockerfile
build-args: |
REGISTRY=harbor.alexlebens.net/v2/proxy-registry-1.docker.io/
- name: Actions Ntfy
run: |
curl \
-H "Authorization: Bearer ${{ secrets.NTFY_CRED }}" \
-H "Title: Site-Profile Image Released to Gitea: ${{ steps.meta.outputs.tags }}" \
-H "Content-Type: text/plain" \
-d 'Repo: ${{ gitea.repository }}\nCommit: ${{ gitea.sha }}\nRef: ${{ gitea.ref }}\nStatus: ${{ job.status}}' \
${{ secrets.NTFY_URL }}
- name: ntfy Success
uses: niniyas/ntfy-action@master
if: success()
with:
url: '${{ secrets.NTFY_URL }}'
topic: '${{ secrets.NTFY_TOPIC }}'
title: "Gitea Action"
priority: 3
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
tags: action,successfully,completed
details: 'Site Profile build workflow has successfully completed!'
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
- name: ntfy Failed
uses: niniyas/ntfy-action@master
if: failure()
with:
url: '${{ secrets.NTFY_URL }}'
topic: '${{ secrets.NTFY_TOPIC }}'
title: "Gitea Action"
priority: 4
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
tags: action,failed
details: 'Site Profile build workflow has failed!'
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
actions: '[{"action": "view", "label": "Open Gitea", "url": "https://gitea.alexlebens.dev/alexlebens/site-profile/actions?workflow=release-image.yml", "clear": true}]'
image: true

View File

@@ -15,16 +15,19 @@ jobs:
runs-on: ubuntu-latest
container: ghcr.io/renovatebot/renovate:40
steps:
- uses: actions/checkout@v4
- run: renovate
- name: Checkout
uses: actions/checkout@v4
- name: Renovate
run: renovate
env:
RENOVATE_PLATFORM: gitea
RENOVATE_AUTODISCOVER: true
RENOVATE_ONBOARDING: true
RENOVATE_ENDPOINT: http://gitea-http.gitea:3000
RENOVATE_ENDPOINT: ${{ vars.INSTANCE_URL }}
RENOVATE_GIT_AUTHOR: Renovate Bot <renovate-bot@alexlebens.net>
LOG_LEVEL: debug
LOG_LEVEL: info
RENOVATE_TOKEN: ${{ secrets.RENOVATE_TOKEN }}
RENOVATE_GIT_PRIVATE_KEY: ${{ secrets.RENOVATE_GIT_PRIVATE_KEY }}
RENOVATE_GITHUB_COM_TOKEN: ${{ secrets.RENOVATE_GITHUB_COM_TOKEN }}
RENOVATE_REDIS_URL: redis://gitea-renovate-valkey-primary.gitea:6379
RENOVATE_REDIS_URL: ${{ vars.RENOVATE_REDIS_URL }}

View File

@@ -0,0 +1,75 @@
name: tag-old-issues
on:
schedule:
- cron: "@daily"
jobs:
tag-old-issues:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Tag Old Issues
env:
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
INSTANCE_URL: ${{ vars.INSTANCE_URL }}
REPO_OWNER: ${{ github.repository_owner }}
REPO_NAME: ${{ github.repository_name }}
TAG_NAME: 'stale'
DAYS_OLD: 3
EXCLUDE_TAG_NAME: ''
REQUIRED_TAG: 'automerge'
run: |
# Install necessary tools
apt-get update && apt-get install -y jq curl
# --- Conditionally build the API URL ---
API_URL="${GITEA_INSTANCE_URL}/api/v1/repos/${REPO_OWNER}/${REPO_NAME}/issues?state=open"
if [[ -n "${REQUIRED_TAG}" ]]; then
echo "Filtering for issues with the required tag: ${REQUIRED_TAG}"
# URL-encode the tag to handle special characters
ENCODED_TAG=$(jq -s -R -r @uri <<< "${REQUIRED_TAG}")
API_URL="${API_URL}&labels=${ENCODED_TAG}"
else
echo "No required tag specified. Checking all open issues."
fi
# Fetch issues using the constructed URL
ISSUES=$(curl -s -X GET \
-H "Authorization: token ${BOT_TOKEN}" \
-H "Accept: application/json" \
"${API_URL}")
# Calculate the date ${DAYS_OLD} days ago in ISO 8601 format
OLDER_THAN_DATE=$(date -d "-${DAYS_OLD} days" -u +"%Y-%m-%dT%H:%M:%SZ")
# Filter issues older than the specified date and without the exclusion tag
echo "$ISSUES" | jq -c '.[] | select(.created_at < "'"$OLDER_THAN_DATE"'")' | while read -r issue; do
ISSUE_NUMBER=$(echo "$issue" | jq -r '.number')
LABELS=$(echo "$issue" | jq -r '.labels[].name')
# Check if the issue has the exclusion tag
if ! echo "$LABELS" | grep -q -w "${EXCLUDE_TAG_NAME}"; then
echo "Tagging issue #${ISSUE_NUMBER} as ${TAG_NAME}"
# Get existing labels for the issue
EXISTING_LABELS=$(curl -s -X GET \
-H "Authorization: token ${BOT_TOKEN}" \
-H "Accept: application/json" \
"${INSTANCE_URL}/api/v1/repos/${REPO_OWNER}/${REPO_NAME}/issues/${ISSUE_NUMBER}/labels" | jq -r '.[].name')
# Add the new tag to the list of existing labels
NEW_LABELS=$(echo -e "${EXISTING_LABELS}\n${TAG_NAME}" | sort -u | jq -R -s -c 'split("\n") | map(select(length > 0))')
# Update the issue with the new set of labels
curl -s -X PUT \
-H "Authorization: token ${BOT_TOKEN}" \
-H "Content-Type: application/json" \
-d "{\"labels\": $(echo "$NEW_LABELS" | jq -r 'map(select(. != ""))')}" \
"${INSTANCE_URL}/api/v1/repos/${REPO_OWNER}/${REPO_NAME}/issues/${ISSUE_NUMBER}/labels"
else
echo "Skipping issue #${ISSUE_NUMBER} because it has the '${EXCLUDE_TAG_NAME}' tag."
fi
done

View File

@@ -1,7 +1,7 @@
ARG REGISTRY
FROM ${REGISTRY}node:22.16.0-alpine3.22 AS base
ARG REGISTRY=hub.docker.com
FROM ${REGISTRY}/node:22.16.0-alpine3.22 AS base
LABEL version="0.8.4"
LABEL version="0.8.10"
LABEL description="Astro based personal website"
ENV PNPM_HOME="/pnpm"
@@ -13,15 +13,15 @@ WORKDIR /app
COPY package.json pnpm-lock.yaml ./
FROM base AS prod-deps
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --save form-data
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile
FROM prod-deps AS build-deps
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --save form-data
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
FROM build-deps AS build
COPY . .
RUN pnpm run build
RUN npm prune --production
RUN pnpm prune --prod
FROM base AS runtime
COPY --from=prod-deps /app/node_modules /app/node_modules
@@ -33,4 +33,4 @@ ENV DIRECTUS_URL=https://directus.alexlebens.dev
ENV PORT=4321
EXPOSE $PORT
CMD node ./dist/server/entry.mjs
CMD ["node", "./dist/server/entry.mjs"]

View File

@@ -1,7 +1,7 @@
{
"name": "site-profile",
"type": "module",
"version": "0.8.4",
"version": "0.8.10",
"private": true,
"scripts": {
"dev": "astro dev",
@@ -19,7 +19,7 @@
"@directus/sdk": "^19.1.0",
"@tailwindcss/postcss": "^4.1.8",
"@tailwindcss/vite": "^4.1.8",
"astro": "^5.9.1",
"astro": "^5.9.2",
"form-data": "4.0.3",
"framer-motion": "^12.16.0",
"postcss-preset-env": "^10.2.1",

29
pnpm-lock.yaml generated
View File

@@ -10,10 +10,10 @@ importers:
dependencies:
'@astrojs/mdx':
specifier: ^4.3.0
version: 4.3.0(astro@5.9.1(@types/node@22.15.30)(jiti@2.4.2)(lightningcss@1.30.1)(rollup@4.42.0)(typescript@5.8.3)(yaml@2.8.0))
version: 4.3.0(astro@5.9.2(@types/node@22.15.30)(jiti@2.4.2)(lightningcss@1.30.1)(rollup@4.42.0)(typescript@5.8.3)(yaml@2.8.0))
'@astrojs/node':
specifier: ^9.2.2
version: 9.2.2(astro@5.9.1(@types/node@22.15.30)(jiti@2.4.2)(lightningcss@1.30.1)(rollup@4.42.0)(typescript@5.8.3)(yaml@2.8.0))
version: 9.2.2(astro@5.9.2(@types/node@22.15.30)(jiti@2.4.2)(lightningcss@1.30.1)(rollup@4.42.0)(typescript@5.8.3)(yaml@2.8.0))
'@astrojs/react':
specifier: ^4.3.0
version: 4.3.0(@types/node@22.15.30)(@types/react-dom@19.1.6(@types/react@19.1.6))(@types/react@19.1.6)(jiti@2.4.2)(lightningcss@1.30.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(yaml@2.8.0)
@@ -33,8 +33,8 @@ importers:
specifier: ^4.1.8
version: 4.1.8(vite@6.3.5(@types/node@22.15.30)(jiti@2.4.2)(lightningcss@1.30.1)(yaml@2.8.0))
astro:
specifier: ^5.9.1
version: 5.9.1(@types/node@22.15.30)(jiti@2.4.2)(lightningcss@1.30.1)(rollup@4.42.0)(typescript@5.8.3)(yaml@2.8.0)
specifier: ^5.9.2
version: 5.9.2(@types/node@22.15.30)(jiti@2.4.2)(lightningcss@1.30.1)(rollup@4.42.0)(typescript@5.8.3)(yaml@2.8.0)
form-data:
specifier: 4.0.3
version: 4.0.3
@@ -89,6 +89,9 @@ packages:
'@astrojs/compiler@2.12.1':
resolution: {integrity: sha512-WDSyVIiz7sNcJcCJxJFITu6XjfGhJ50Z0auyaWsrM+xb07IlhBLFtQuDkNy0caVHWNcKTM2LISAaHhgkRqGAVg==}
'@astrojs/compiler@2.12.2':
resolution: {integrity: sha512-w2zfvhjNCkNMmMMOn5b0J8+OmUaBL1o40ipMvqcG6NRpdC+lKxmTi48DT8Xw0SzJ3AfmeFLB45zXZXtmbsjcgw==}
'@astrojs/internal-helpers@0.6.1':
resolution: {integrity: sha512-l5Pqf6uZu31aG+3Lv8nl/3s4DbUzdlxTWDof4pEpto6GUJNhhCbelVi9dEyurOVyqaelwmS9oSyOWOENSfgo9A==}
@@ -1113,8 +1116,8 @@ packages:
resolution: {integrity: sha512-LElXdjswlqjWrPpJFg1Fx4wpkOCxj1TDHlSV4PlaRxHGWko024xICaa97ZkMfs6DRKlCguiAI+rbXv5GWwXIkg==}
hasBin: true
astro@5.9.1:
resolution: {integrity: sha512-wxoJcTbuDZNFSv6EaL0PAlrp0Wx6VnOAULCXvy0scsV70oWMeUkdxuBxfO54JxO5Qgyvwj9h99y6E0elqOpGtA==}
astro@5.9.2:
resolution: {integrity: sha512-K/zZlQOWMpamfLDOls5jvG7lrsjH1gkk3ESRZyZDCkVBtKHMF4LbjwCicm/iBb3mX3V/PerqRYzLbOy3/4JLCQ==}
engines: {node: 18.20.8 || ^20.3.0 || >=22.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0'}
hasBin: true
@@ -2884,6 +2887,8 @@ snapshots:
'@astrojs/compiler@2.12.1': {}
'@astrojs/compiler@2.12.2': {}
'@astrojs/internal-helpers@0.6.1': {}
'@astrojs/markdown-remark@6.3.2':
@@ -2912,12 +2917,12 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@astrojs/mdx@4.3.0(astro@5.9.1(@types/node@22.15.30)(jiti@2.4.2)(lightningcss@1.30.1)(rollup@4.42.0)(typescript@5.8.3)(yaml@2.8.0))':
'@astrojs/mdx@4.3.0(astro@5.9.2(@types/node@22.15.30)(jiti@2.4.2)(lightningcss@1.30.1)(rollup@4.42.0)(typescript@5.8.3)(yaml@2.8.0))':
dependencies:
'@astrojs/markdown-remark': 6.3.2
'@mdx-js/mdx': 3.1.0(acorn@8.14.1)
acorn: 8.14.1
astro: 5.9.1(@types/node@22.15.30)(jiti@2.4.2)(lightningcss@1.30.1)(rollup@4.42.0)(typescript@5.8.3)(yaml@2.8.0)
astro: 5.9.2(@types/node@22.15.30)(jiti@2.4.2)(lightningcss@1.30.1)(rollup@4.42.0)(typescript@5.8.3)(yaml@2.8.0)
es-module-lexer: 1.7.0
estree-util-visit: 2.0.0
hast-util-to-html: 9.0.5
@@ -2931,10 +2936,10 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@astrojs/node@9.2.2(astro@5.9.1(@types/node@22.15.30)(jiti@2.4.2)(lightningcss@1.30.1)(rollup@4.42.0)(typescript@5.8.3)(yaml@2.8.0))':
'@astrojs/node@9.2.2(astro@5.9.2(@types/node@22.15.30)(jiti@2.4.2)(lightningcss@1.30.1)(rollup@4.42.0)(typescript@5.8.3)(yaml@2.8.0))':
dependencies:
'@astrojs/internal-helpers': 0.6.1
astro: 5.9.1(@types/node@22.15.30)(jiti@2.4.2)(lightningcss@1.30.1)(rollup@4.42.0)(typescript@5.8.3)(yaml@2.8.0)
astro: 5.9.2(@types/node@22.15.30)(jiti@2.4.2)(lightningcss@1.30.1)(rollup@4.42.0)(typescript@5.8.3)(yaml@2.8.0)
send: 1.2.0
server-destroy: 1.0.1
transitivePeerDependencies:
@@ -3893,9 +3898,9 @@ snapshots:
astring@1.9.0: {}
astro@5.9.1(@types/node@22.15.30)(jiti@2.4.2)(lightningcss@1.30.1)(rollup@4.42.0)(typescript@5.8.3)(yaml@2.8.0):
astro@5.9.2(@types/node@22.15.30)(jiti@2.4.2)(lightningcss@1.30.1)(rollup@4.42.0)(typescript@5.8.3)(yaml@2.8.0):
dependencies:
'@astrojs/compiler': 2.12.1
'@astrojs/compiler': 2.12.2
'@astrojs/internal-helpers': 0.6.1
'@astrojs/markdown-remark': 6.3.2
'@astrojs/telemetry': 3.3.0