This commit is contained in:
parent
459cf79f50
commit
44a6e04a42
10 changed files with 23 additions and 182 deletions
|
@ -1,2 +1,6 @@
|
||||||
target
|
*
|
||||||
Dockerfile
|
.*
|
||||||
|
!src/
|
||||||
|
!templates/
|
||||||
|
!Cargo.lock
|
||||||
|
!Cargo.toml
|
||||||
|
|
12
.github/dependabot.yml
vendored
12
.github/dependabot.yml
vendored
|
@ -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"
|
|
16
.github/workflows/audit.yml
vendored
16
.github/workflows/audit.yml
vendored
|
@ -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 }}
|
|
14
.github/workflows/audit_cron.yml
vendored
14
.github/workflows/audit_cron.yml
vendored
|
@ -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 }}
|
|
62
.github/workflows/ci.yml
vendored
62
.github/workflows/ci.yml
vendored
|
@ -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
|
|
55
.github/workflows/docker-publish.yml
vendored
55
.github/workflows/docker-publish.yml
vendored
|
@ -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 }}
|
|
|
@ -1,8 +0,0 @@
|
||||||
version: '3'
|
|
||||||
services:
|
|
||||||
bin:
|
|
||||||
build:
|
|
||||||
context: .
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
ports:
|
|
||||||
- "8000:8000"
|
|
|
@ -1,25 +1,21 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<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 charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<title>bin.</title>
|
<title>bin</title>
|
||||||
<link rel="help" href="https://github.com/w4/bin">
|
|
||||||
<style>
|
<style>
|
||||||
* { box-sizing: border-box; }
|
* { box-sizing: border-box; }
|
||||||
html, body { margin: 0; }
|
html, body { margin: 0; }
|
||||||
body {
|
body {
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
padding: 2rem;
|
background: #101010;
|
||||||
background: #263238;
|
color: #c6c6c6;
|
||||||
color: #B0BEC5;
|
|
||||||
line-height: 1.4;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
body, code, textarea { font-family: monospace; }
|
body, code, textarea { font-family: mononoki; }
|
||||||
code {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
{% block styles %}{% endblock styles %}
|
{% block styles %}{% endblock styles %}
|
||||||
</style>
|
</style>
|
||||||
{% block head %}{% endblock head %}
|
{% block head %}{% endblock head %}
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
{% block styles %}
|
{% block styles %}
|
||||||
form { flex: 1; }
|
form { flex: 1; }
|
||||||
|
body { padding: 2rem; }
|
||||||
|
|
||||||
textarea {
|
textarea {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
@ -30,9 +31,9 @@
|
||||||
width: 3rem;
|
width: 3rem;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background: #2196F3;
|
background: #696969;
|
||||||
|
|
||||||
color: white;
|
color: #C6C6C6;
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
|
@ -3,16 +3,21 @@
|
||||||
{% block styles %}
|
{% block styles %}
|
||||||
pre {
|
pre {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
min-width: 100%;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
line-height: inherit;
|
line-height: inherit;
|
||||||
counter-reset: line;
|
counter-reset: line;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
code {
|
code {
|
||||||
counter-increment: line;
|
counter-increment: line;
|
||||||
|
padding: 0 2rem;
|
||||||
|
display: inline-block;
|
||||||
}
|
}
|
||||||
code::before {
|
code::before {
|
||||||
content: counter(line);
|
content: counter(line);
|
||||||
|
@ -23,6 +28,8 @@
|
||||||
color: #888;
|
color: #888;
|
||||||
-webkit-user-select: none;
|
-webkit-user-select: none;
|
||||||
}
|
}
|
||||||
|
pre > code:last-child { margin-bottom: 1rem; }
|
||||||
|
pre > code:first-child { margin-top: 1rem; }
|
||||||
{% endblock styles %}
|
{% endblock styles %}
|
||||||
|
|
||||||
{% block head %}
|
{% block head %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue