This commit is contained in:
Arthur K. 2025-05-29 17:14:23 +03:00
parent 459cf79f50
commit 44a6e04a42
Signed by: wzray
GPG key ID: B97F30FDC4636357
10 changed files with 23 additions and 182 deletions

View file

@ -1,2 +1,6 @@
target
Dockerfile
*
.*
!src/
!templates/
!Cargo.lock
!Cargo.toml

View file

@ -1,12 +0,0 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "monthly"

View file

@ -1,16 +0,0 @@
name: Security audit
on:
push:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
jobs:
security_audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}

View file

@ -1,14 +0,0 @@
name: Security audit (cron)
on:
schedule:
- cron: '0 0 * * *'
jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}

View file

@ -1,62 +0,0 @@
on: [push, pull_request]
name: CI
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: check
test:
name: Test Suite
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: test
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
with:
command: clippy

View file

@ -1,55 +0,0 @@
name: Docker
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
on:
schedule:
- cron: '45 20 * * *'
push:
branches: [ master ]
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
pull_request:
branches: [ master ]
env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

View file

@ -1,8 +0,0 @@
version: '3'
services:
bin:
build:
context: .
dockerfile: Dockerfile
ports:
- "8000:8000"

View file

@ -1,25 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="icon" href="https://cdn.wzray.com/web/favicon.ico">
<link rel="stylesheet" href="https://cdn.wzray.com/web/fonts/mononoki.css">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>bin.</title>
<link rel="help" href="https://github.com/w4/bin">
<title>bin</title>
<style>
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
height: 100vh;
padding: 2rem;
background: #263238;
color: #B0BEC5;
line-height: 1.4;
background: #101010;
color: #c6c6c6;
display: flex;
}
body, code, textarea { font-family: monospace; }
code {
display: block;
}
body, code, textarea { font-family: mononoki; }
{% block styles %}{% endblock styles %}
</style>
{% block head %}{% endblock head %}

View file

@ -2,6 +2,7 @@
{% block styles %}
form { flex: 1; }
body { padding: 2rem; }
textarea {
height: 100%;
@ -30,9 +31,9 @@
width: 3rem;
border: none;
border-radius: 50%;
background: #2196F3;
background: #696969;
color: white;
color: #C6C6C6;
font-size: 2rem;
cursor: pointer;

View file

@ -3,16 +3,21 @@
{% block styles %}
pre {
height: 100%;
width: 100%;
min-width: 100%;
margin: 0;
overflow: auto;
font-family: inherit;
font-size: 1rem;
line-height: inherit;
counter-reset: line;
display: flex;
flex-direction: column;
flex-shrink: 0;
}
code {
counter-increment: line;
padding: 0 2rem;
display: inline-block;
}
code::before {
content: counter(line);
@ -23,6 +28,8 @@
color: #888;
-webkit-user-select: none;
}
pre > code:last-child { margin-bottom: 1rem; }
pre > code:first-child { margin-top: 1rem; }
{% endblock styles %}
{% block head %}