Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #32

Merged
merged 3 commits into from
Apr 6, 2023
Merged

Dev #32

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
20 changes: 20 additions & 0 deletions .github/workflows/ci-tag-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "Create new release tag"

on:
push:
tags:
- "v*"

jobs:
tagged-release:
name: "Tagged Release"
runs-on: "ubuntu-latest"

steps:
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: ${{ contains(github.ref, 'beta') || contains(github.ref, 'alfa') }}
files: |
LICENSE
README.md
22 changes: 12 additions & 10 deletions .github/workflows/ci-tag.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Build new docker image when a new tag is pushed, and generate changelog and release notes and use the tag as the release name.
# if the tag has beta or alfa in the name, set the release as a pre-release.

name: Push Tag build container
name: Build release image

on:
push:
Expand Down Expand Up @@ -62,12 +62,14 @@ jobs:
${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_REPOSITORY }}:latest
${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_REPOSITORY }}:${{ steps.extract_version.outputs.version_number }}

- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: ${{ contains(github.ref, 'beta') || contains(github.ref, 'alfa') }}
automatic_release_tag: ${{ github.event.inputs.version || steps.previoustag.outputs.tag }}
title: ${{ steps.previoustag.outputs.tag }}
files: |
LICENSE
README.md
# - uses: "marvinpinto/action-automatic-releases@latest"
# with:
# repo_token: "${{ secrets.GITHUB_TOKEN }}"
# prerelease: ${{ contains(github.ref, 'beta') || contains(github.ref, 'alfa') }}
# files: |
# LICENSE
# README.md

# prerelease: ${{ contains(github.ref, 'beta') || contains(github.ref, 'alfa') }}
# automatic_release_tag: ${{ github.event.inputs.version || steps.previoustag.outputs.tag }}
# title: ${{ steps.previoustag.outputs.tag }}
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ services:
platform: "linux/amd64"
working_dir: /app
volumes:
- zerotier:/var/lib/zerotier-one
- zerotier:/var/lib/zerotier-one:ro
restart: unless-stopped
ports:
- 3000:3000
Expand Down
4 changes: 2 additions & 2 deletions src/components/elements/inputField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ const InputField = ({
) : (
<dd className="mt-1 flex items-center gap-2 text-sm">
{placeholder ?? fields[0].placeholder}
{badge && (
{badge ? (
<div className={`badge badge-${badge.color}`}>{badge.text}</div>
)}
) : null}
</dd>
)}
</>
Expand Down
8 changes: 7 additions & 1 deletion src/utils/ztApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,15 @@ export const network_create = async (
if (axios.isAxiosError(error)) {
const axiosError = error as AxiosError;
// eslint-disable-next-line no-console
console.error(axiosError.response?.statusText || "Unknown error");
console.error(`Axios error: ${axiosError.message}`);
// eslint-disable-next-line no-console
console.error(`Status code: ${axiosError.response?.status}`);
// eslint-disable-next-line no-console
console.error(`Status text: ${axiosError.response?.statusText}`);
throw axiosError;
}
// eslint-disable-next-line no-console
console.error(`Unknown error: ${error.message}`);
throw error;
}
};
Expand Down