fix: workflow path
This commit is contained in:
@@ -6,12 +6,6 @@ on:
|
|||||||
- release
|
- release
|
||||||
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
|
||||||
directus-release:
|
|
||||||
description: 'A parameter passed via API'
|
|
||||||
required: true
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -35,19 +29,18 @@ jobs:
|
|||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: bun install --frozen-lockfile
|
run: bun install --frozen-lockfile
|
||||||
|
|
||||||
- name: Cache Astro Build
|
- name: Cache Astro Build Cache
|
||||||
uses: actions/cache@v5
|
uses: actions/cache@v5
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
.astro
|
.astro
|
||||||
node_modules/.vite
|
node_modules/.vite
|
||||||
key: ${{ runner.os }}-astro-${{ hashFiles('**/*.astro', 'astro.config.mjs') }}-${{ github.event_name == 'workflow_dispatch' && github.run_id || 'static' }}
|
key: ${{ runner.os }}-astro-${{ hashFiles('**/*.astro', 'astro.config.mjs') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-astro-${{ hashFiles('**/*.astro', 'astro.config.mjs') }}-
|
|
||||||
${{ runner.os }}-astro-
|
${{ runner.os }}-astro-
|
||||||
|
|
||||||
- name: Lint Code
|
# - name: Lint Code
|
||||||
run: bun run lint
|
# run: bun run lint
|
||||||
|
|
||||||
- name: Build Project
|
- name: Build Project
|
||||||
run: bun run build
|
run: bun run build
|
||||||
@@ -58,13 +51,13 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
url: '${{ secrets.NTFY_URL }}'
|
url: '${{ secrets.NTFY_URL }}'
|
||||||
topic: '${{ secrets.NTFY_TOPIC }}'
|
topic: '${{ secrets.NTFY_TOPIC }}'
|
||||||
title: 'Test Failure - Site Profile'
|
title: 'Test Failure - Site Documentation'
|
||||||
priority: 4
|
priority: 4
|
||||||
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
||||||
tags: action,failed
|
tags: action,failed
|
||||||
details: 'During release tests failed for building Site Profile'
|
details: 'During release tests failed for building Site Documentation'
|
||||||
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
|
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.yaml", "clear": true}]'
|
actions: '[{"action": "view", "label": "Open Gitea", "url": "https://gitea.alexlebens.dev/alexlebens/site-saralebens/actions?workflow=release-image.yaml", "clear": true}]'
|
||||||
image: true
|
image: true
|
||||||
|
|
||||||
guarddog:
|
guarddog:
|
||||||
@@ -95,21 +88,18 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
url: '${{ secrets.NTFY_URL }}'
|
url: '${{ secrets.NTFY_URL }}'
|
||||||
topic: '${{ secrets.NTFY_TOPIC }}'
|
topic: '${{ secrets.NTFY_TOPIC }}'
|
||||||
title: 'Security Failure - Site Profile'
|
title: 'Security Failure - Site Documentation'
|
||||||
priority: 4
|
priority: 4
|
||||||
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
||||||
tags: action,failed
|
tags: action,failed
|
||||||
details: 'During release guarddog scan failed for Site Profile'
|
details: 'During release guarddog scan failed for Site Documentation'
|
||||||
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
|
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.yaml", "clear": true}]'
|
actions: '[{"action": "view", "label": "Open Gitea", "url": "https://gitea.alexlebens.dev/alexlebens/site-saralebens/actions?workflow=release-image.yaml", "clear": true}]'
|
||||||
image: true
|
image: true
|
||||||
|
|
||||||
semantic-release:
|
semantic-release:
|
||||||
needs: [ build, guarddog ]
|
needs: [ build, guarddog ]
|
||||||
runs-on: ubuntu-js
|
runs-on: ubuntu-js
|
||||||
if: |
|
|
||||||
github.event_name != 'workflow_dispatch' ||
|
|
||||||
inputs['directus-release'] == 'true'
|
|
||||||
outputs:
|
outputs:
|
||||||
new-release-published: ${{ steps.semantic.outputs.new-release-published }}
|
new-release-published: ${{ steps.semantic.outputs.new-release-published }}
|
||||||
new-release-version: ${{ steps.semantic.outputs.new-release-version }}
|
new-release-version: ${{ steps.semantic.outputs.new-release-version }}
|
||||||
@@ -121,13 +111,6 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
token: ${{ secrets.BOT_TOKEN }}
|
token: ${{ secrets.BOT_TOKEN }}
|
||||||
|
|
||||||
- name: Prepare Content Patch
|
|
||||||
if: inputs['directus-release'] == 'true'
|
|
||||||
run: |
|
|
||||||
git config user.name "gitea-bot"
|
|
||||||
git config user.email "gitea-bot@alexlebens.net"
|
|
||||||
git commit --allow-empty -m "fix(content): directus published update [skip ci]"
|
|
||||||
|
|
||||||
- name: Set up Node
|
- name: Set up Node
|
||||||
uses: actions/setup-node@v6
|
uses: actions/setup-node@v6
|
||||||
with:
|
with:
|
||||||
@@ -199,7 +182,7 @@ jobs:
|
|||||||
uses: docker/metadata-action@v6
|
uses: docker/metadata-action@v6
|
||||||
with:
|
with:
|
||||||
images: |
|
images: |
|
||||||
${{ vars.REGISTRY_HOST }}/images/site-profile
|
${{ vars.REGISTRY_HOST }}/images/site-saralebens
|
||||||
tags: |
|
tags: |
|
||||||
type=ref,event=branch
|
type=ref,event=branch
|
||||||
type=sha,format=long
|
type=sha,format=long
|
||||||
@@ -230,11 +213,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
url: '${{ secrets.NTFY_URL }}'
|
url: '${{ secrets.NTFY_URL }}'
|
||||||
topic: '${{ secrets.NTFY_TOPIC }}'
|
topic: '${{ secrets.NTFY_TOPIC }}'
|
||||||
title: 'Release Success - Site Profile'
|
title: 'Release Success - Site Documentation'
|
||||||
priority: 3
|
priority: 3
|
||||||
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
||||||
tags: action,successfully,completed
|
tags: action,successfully,completed
|
||||||
details: 'Harbor Image for Site Profile has been released!'
|
details: 'Harbor Image for Site Documentation has been released!'
|
||||||
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
|
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
|
||||||
|
|
||||||
- name: ntfy Failed
|
- name: ntfy Failed
|
||||||
@@ -243,20 +226,20 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
url: '${{ secrets.NTFY_URL }}'
|
url: '${{ secrets.NTFY_URL }}'
|
||||||
topic: '${{ secrets.NTFY_TOPIC }}'
|
topic: '${{ secrets.NTFY_TOPIC }}'
|
||||||
title: 'Release Failure - Site Profile'
|
title: 'Release Failure - Site Documentation'
|
||||||
priority: 4
|
priority: 4
|
||||||
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
||||||
tags: action,failed
|
tags: action,failed
|
||||||
details: 'Harbor Image for Site Profile has failed to be released.'
|
details: 'Harbor Image for Site Documentation has failed to be released.'
|
||||||
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
|
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.yaml", "clear": true}]'
|
actions: '[{"action": "view", "label": "Open Gitea", "url": "https://gitea.alexlebens.dev/alexlebens/site-saralebens/actions?workflow=release-image.yml", "clear": true}]'
|
||||||
image: true
|
image: true
|
||||||
|
|
||||||
release-gitea:
|
release-gitea:
|
||||||
runs-on: ubuntu-js
|
runs-on: ubuntu-js
|
||||||
needs: [ semantic-release, release-harbor ]
|
needs: [ semantic-release, release-harbor ]
|
||||||
if: |
|
if: |
|
||||||
always() &&
|
always() &&
|
||||||
needs.semantic-release.outputs.new-release-published == 'true'
|
needs.semantic-release.outputs.new-release-published == 'true'
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -334,11 +317,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
url: '${{ secrets.NTFY_URL }}'
|
url: '${{ secrets.NTFY_URL }}'
|
||||||
topic: '${{ secrets.NTFY_TOPIC }}'
|
topic: '${{ secrets.NTFY_TOPIC }}'
|
||||||
title: 'Release Success - Site Profile'
|
title: 'Release Success - Site Documentation'
|
||||||
priority: 3
|
priority: 3
|
||||||
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
||||||
tags: action,successfully,completed
|
tags: action,successfully,completed
|
||||||
details: 'Gitea Image for Site Profile has been released!'
|
details: 'Gitea Image for Site Documentation has been released!'
|
||||||
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
|
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
|
||||||
|
|
||||||
- name: ntfy Failed
|
- name: ntfy Failed
|
||||||
@@ -347,11 +330,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
url: '${{ secrets.NTFY_URL }}'
|
url: '${{ secrets.NTFY_URL }}'
|
||||||
topic: '${{ secrets.NTFY_TOPIC }}'
|
topic: '${{ secrets.NTFY_TOPIC }}'
|
||||||
title: 'Release Failure - Site Profile'
|
title: 'Release Failure - Site Documentation'
|
||||||
priority: 4
|
priority: 4
|
||||||
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
||||||
tags: action,failed
|
tags: action,failed
|
||||||
details: 'Gitea Image for Site Profile has failed to be released.'
|
details: 'Gitea Image for Site Documentation has failed to be released.'
|
||||||
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
|
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.yaml", "clear": true}]'
|
actions: '[{"action": "view", "label": "Open Gitea", "url": "https://gitea.alexlebens.dev/alexlebens/site-saralebens/actions?workflow=release-image.yaml", "clear": true}]'
|
||||||
image: true
|
image: true
|
||||||
@@ -19,7 +19,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
RENOVATE_PLATFORM: gitea
|
RENOVATE_PLATFORM: gitea
|
||||||
RENOVATE_ENDPOINT: ${{ vars.INSTANCE_URL }}
|
RENOVATE_ENDPOINT: ${{ vars.INSTANCE_URL }}
|
||||||
RENOVATE_REPOSITORIES: alexlebens/site-profile
|
RENOVATE_REPOSITORIES: alexlebens/site-saralebens
|
||||||
RENOVATE_GIT_AUTHOR: Renovate Bot <renovate-bot@alexlebens.net>
|
RENOVATE_GIT_AUTHOR: Renovate Bot <renovate-bot@alexlebens.net>
|
||||||
RENOVATE_REDIS_URL: ${{ vars.RENOVATE_REDIS_URL }}
|
RENOVATE_REDIS_URL: ${{ vars.RENOVATE_REDIS_URL }}
|
||||||
LOG_LEVEL: debug
|
LOG_LEVEL: debug
|
||||||
@@ -60,7 +60,7 @@ jobs:
|
|||||||
tags: action,failed
|
tags: action,failed
|
||||||
details: 'Tests have failed for building Site Profile'
|
details: 'Tests have failed for building Site Profile'
|
||||||
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
|
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=test-build.yaml", "clear": true}]'
|
actions: '[{"action": "view", "label": "Open Gitea", "url": "https://gitea.alexlebens.dev/alexlebens/site-saralebens/actions?workflow=test-build.yaml", "clear": true}]'
|
||||||
image: true
|
image: true
|
||||||
|
|
||||||
guarddog:
|
guarddog:
|
||||||
@@ -95,5 +95,5 @@ jobs:
|
|||||||
tags: action,failed
|
tags: action,failed
|
||||||
details: 'Guarddog scan failed for Site Profile'
|
details: 'Guarddog scan failed for Site Profile'
|
||||||
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
|
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=test-build.yaml", "clear": true}]'
|
actions: '[{"action": "view", "label": "Open Gitea", "url": "https://gitea.alexlebens.dev/alexlebens/site-saralebens/actions?workflow=test-build.yaml", "clear": true}]'
|
||||||
image: true
|
image: true
|
||||||
Reference in New Issue
Block a user