Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ env:
IMAGE_NAME: ${{ github.repository }}

jobs:

detect-quota:
# Probe the hosted runner flavor used by release steps so we can fall
# back if necessary.
Expand All @@ -43,13 +44,17 @@ jobs:
if: ${{ always() }}
runs-on: ${{ needs.detect-quota.result == 'success' && 'ubuntu-latest' || 'self-hosted' }}
continue-on-error: true

steps:

- name: Release Please
uses: googleapis/release-please-action@v4
id: release
with:
release-type: node

# From:
# https://github.com/googleapis/release-please-action?tab=readme-ov-file#creating-majorminor-tags
- name: Checkout
uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created }}
Expand All @@ -63,8 +68,11 @@ jobs:
git tag -d v${{ steps.release.outputs.major }} || true
git tag -d v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
git push origin :v${{ steps.release.outputs.major }} || true
git push origin :v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
git tag -a v${{ steps.release.outputs.major }} -m "Release v${{ steps.release.outputs.major }}"
git tag -a v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} -m "Release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}"
git push origin v${{ steps.release.outputs.major }}
git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }}
git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}

- name: Setup QEMU
if: ${{ steps.release.outputs.release_created }}
Expand All @@ -89,6 +97,10 @@ jobs:
with:
images: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# Commit SHA Tag
# The Tag based on the branch (main)
# The "prod" Tag, indicating a production-ready image
# The Major, Major.Minor, and Major.Minor.Patch tags
tags: |
type=sha
type=ref,event=branch
Expand Down
10 changes: 10 additions & 0 deletions src/plugins/init-mongo.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import fp from "fastify-plugin";

// import { Collection } from "mongodb";

export type InitMongoPluginOptions = Record<never, unknown>;

// The use of fastify-plugin is required to be able
Expand All @@ -12,3 +14,11 @@ export default fp<InitMongoPluginOptions>(async (fastify, opts) => {
// .createIndex({ example: 1 });
});
});

// declare module "fastify" {
// export interface FastifyInstance {
// collections: {
// example: Collection<unknown>;
// };
// }
// }
Loading