Trying an automated workflow

Added sample config
This commit is contained in:
Jordan Roher 2023-04-22 11:06:06 -07:00
parent d903fa476b
commit 790dcb7a5f
8 changed files with 86 additions and 5 deletions

View File

@ -4,4 +4,3 @@ node_modules
dist
dist-ssr
compose.yml
src/config.json

45
.github/workflows/main.yml vendored Normal file
View File

@ -0,0 +1,45 @@
name: docker-ci
on:
push:
branches:
- "main"
env:
USER: jordanroher
REPO: starbase-80
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set variables
run: |
VER=$(cat VERSION)
echo "VERSION=$VER" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
push: true
context: .
file: dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v8
tags: |
${{ env.USER }}/${{ env.REPO }}:${{ env.VERSION }}
${{ env.USER }}/${{ env.REPO }}:latest

1
.gitignore vendored
View File

@ -2,5 +2,4 @@ node_modules
.DS_Store
dist
dist-ssr
src/config.json
public

View File

@ -4,7 +4,7 @@
LOGO=${LOGO//\//\\/}
# HTML replacement
sed -i -e 's/HTMLTITLE/'"${TITLE}"'/g' /app/index.html
sed -i -e 's/My Website/'"${TITLE}"'/g' /app/index.html
# TypeScript replacement
sed -i -e 's/PAGETITLE = "My Website"/PAGETITLE = "'"${TITLE}"'"/g' /app/src/variables.ts

View File

@ -1,5 +1,14 @@
FROM node:18-alpine
ARG BUILD_DATE
LABEL \
maintainer="Jordan Roher <jordan@notclickable.com>" \
org.opencontainers.image.authors="Jordan Roher <jordan@notclickable.com>" \
org.opencontainers.image.title="starbase-80" \
org.opencontainers.image.description="A nice app grid of icons for Docker services" \
org.opencontainers.image.created=$BUILD_DATE
WORKDIR /app
COPY package.json .
@ -18,6 +27,8 @@ ENV CATEGORIES "normal"
ENV BGCOLOR "theme(colors.slate.50)"
ENV BGCOLORDARK "theme(colors.gray.950)"
COPY version /
EXPOSE 4173
RUN chmod +x /app/docker-entrypoint.sh

View File

@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
<title>HTMLTITLE</title>
<title>My Website</title>
</head>
<body>
<div id="root"></div>

26
src/config.json Normal file
View File

@ -0,0 +1,26 @@
[
{
"category": "Example category",
"services": [
{
"name": "Check the readme",
"uri": "https://github.com/notclickable-jordan/starbase-80",
"description": "Use your own icons",
"icon": "github"
},
{
"name": "Bind mount",
"uri": "https://github.com/notclickable-jordan/docker-symphony",
"description": "to /app/src/config.json",
"icon": "docker"
},
{
"name": "Watch Lower Decks",
"uri": "https://www.paramountplus.com/",
"description": "On Paramount+",
"icon": "mdi-image-filter-hdr",
"iconColor": "blue-500"
}
]
}
]

1
version Normal file
View File

@ -0,0 +1 @@
1.1.1