chore: changeset integration (#8)

This commit is contained in:
Shahrad Elahi 2024-04-27 01:06:57 +03:30 committed by GitHub
parent 55d89d7990
commit eb45ccc91e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
16 changed files with 98 additions and 22 deletions

8
.changeset/README.md Normal file
View File

@ -0,0 +1,8 @@
# Changesets
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

11
.changeset/config.json Normal file
View File

@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "canary",
"updateInternalDependencies": "patch",
"ignore": []
}

View File

@ -0,0 +1,5 @@
---
"wireadmin": patch
---
fix: improve `healthcheck` and silence warning form `sveltekit-superforms`

View File

@ -0,0 +1,5 @@
---
"wireadmin": minor
---
fix: storage path was not pointing to `/data`

View File

@ -0,0 +1,5 @@
---
'wireadmin': patch
---
fix: Improve password hashing method and env loader

View File

@ -0,0 +1,5 @@
---
"wireadmin": patch
---
chore: slightly improve server page layout

View File

@ -0,0 +1,5 @@
---
"wireadmin": major
---
fix: using `storage-box` instead of `redis` for storing configs

View File

@ -0,0 +1,5 @@
---
'wireadmin': patch
---
fix: tor config generation when container restarts

View File

@ -0,0 +1,5 @@
---
"wireadmin": minor
---
feat: show total net usage and connection mode in server page

View File

@ -0,0 +1,5 @@
---
"wireadmin": patch
---
fix: using `execa` package for shell access

View File

@ -0,0 +1,5 @@
---
"wireadmin": minor
---
feat: add section for showing the state of background services

View File

@ -1,23 +1,44 @@
name: Build Docker Image
name: Release Package
on:
release:
types: [created]
workflow_dispatch:
inputs:
tag:
description: 'Tag to build'
required: true
env:
BUILD_PLATFORMS: linux/amd64,linux/arm64
IMAGE_TAG: ${{ github.event.inputs.tag }}
permissions:
contents: read
packages: write
jobs:
ghcr-build:
release:
needs: [github-registry, docker-hub]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/action@v1
with:
commit: 'chore(release): version package'
title: 'chore(release): version package'
publish: changeset publish
env:
GITHUB_TOKEN: ${{ secrets.PRIVATE_TOKEN }}
github-registry:
name: Push to GitHub Container Registry
runs-on: ubuntu-latest
env:
IMAGE_NAME: shahradelahi/wireadmin
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v3
@ -29,10 +50,6 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.PRIVATE_TOKEN }}
- run: |
echo "Labeling image with TAG: ${GITHUB_REF#refs/tags/v}"
echo "IMAGE_TAG=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
- name: Push to GitHub Container Registry
uses: docker/build-push-action@v5
with:
@ -40,17 +57,14 @@ jobs:
file: ./Dockerfile
push: true
platforms: ${{ env.BUILD_PLATFORMS }}
args: VERSION=${{ env.IMAGE_TAG }}
tags: ghcr.io/${{ env.IMAGE_NAME }}:latest,ghcr.io/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
docker-build:
docker-hub:
name: Push to DockerHub
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
env:
IMAGE_NAME: litehex/wireadmin
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v3
@ -62,10 +76,6 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- run: |
echo "Labeling image with TAG: ${GITHUB_REF#refs/tags/v}"
echo "IMAGE_TAG=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
- name: Push to DockerHub
uses: docker/build-push-action@v5
with:
@ -73,4 +83,5 @@ jobs:
file: ./Dockerfile
push: true
platforms: ${{ env.BUILD_PLATFORMS }}
args: VERSION=${{ env.IMAGE_TAG }}
tags: docker.io/${{ env.IMAGE_NAME }}:latest,docker.io/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}

View File

@ -7,6 +7,7 @@ web
.env.*
!.env.example
static
.changeset
# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml

View File

@ -1,5 +1,6 @@
ARG ALPINE_VERSION=3.19
ARG NODE_VERSION=20
ARG VERSION=0.0.0-canary
FROM --platform=$BUILDPLATFORM chriswayg/tor-alpine:latest as tor
@ -87,7 +88,6 @@ HEALTHCHECK --interval=60s --timeout=3s --start-period=20s --retries=3 \
VOLUME ["/etc/torrc.d", "/data", "/var/vlogs"]
# Overwrite package version
ARG VERSION=0.0.0-canary
RUN node -e "const fs = require('fs'); const pkg = JSON.parse(fs.readFileSync('/app/package.json')); pkg.version = process.env.VERSION; fs.writeFileSync('/app/package.json', JSON.stringify(pkg, null, 2));"
# Run the app

View File

@ -1,5 +1,6 @@
ARG ALPINE_VERSION=3.19
ARG NODE_VERSION=20
ARG VERSION=0.0.0-dev
FROM --platform=$BUILDPLATFORM chriswayg/tor-alpine:latest as tor
@ -44,7 +45,6 @@ ENV HOST_HEADER=x-forwarded-host
FROM base AS runner
ENV VERSION=0.0.0-dev
ENV NODE_ENV=development
ENV LOG_LEVEL=debug

View File

@ -1,6 +1,6 @@
{
"name": "wireadmin",
"version": "0.0.0-dev",
"version": "1.1.2",
"author": "Shahrad Elahi <https://github.com/shahradelahi>",
"private": true,
"packageManager": "pnpm@8.15.0",