Skip to content

Commit

Permalink
First revision of the RoboTF Stories app
Browse files Browse the repository at this point in the history
  • Loading branch information
kkacsh321 committed Oct 8, 2024
0 parents commit f47a789
Show file tree
Hide file tree
Showing 22 changed files with 1,062 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
./gpu_test_data
./models
Taskfile.yml
Dockerfile
docker-compose.yaml
./scripts
.ppre-commit-config.yaml
Brewfile
Brewfile.lock.json
./.linters
./.github
models/*
4 changes: 4 additions & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
self-hosted-runner:
# Labels of self-hosted runner in array of string
labels:
- robotf-halloween-runner
19 changes: 19 additions & 0 deletions .github/workflows/autorelease.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Publish release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
publish:
runs-on: [robotf-halloween-runner]

permissions: write-all

name: Publish release
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Publish release
uses: eloquent/github-release-action@v3
with:
generateReleaseNotes: "true"
27 changes: 27 additions & 0 deletions .github/workflows/autotagger.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: AutoTag
on:
push:
branches:
- "main"

jobs:
docker:
name: Autotag
runs-on: [robotf-halloween-runner]

permissions: write-all

steps:
- name: Checkout
uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version: "16"

- uses: butlerlogic/[email protected]
env:
GITHUB_TOKEN: "${{ secrets.GH_TOKEN }}"
with:
strategy: package
root: "./"
72 changes: 72 additions & 0 deletions .github/workflows/docker_build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Build and Publish Docker
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"

jobs:
docker:
name: Docker Build and Push
runs-on: [robotf-halloween-runner]

permissions:
id-token: write
actions: write
checks: read
contents: read
pull-requests: write
deployments: write

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Login to Docker Registry
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"

# Setup Docker builds and caching
- name: Set up Docker Context for Buildx
id: buildx-context
run: |
docker context create builders
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
with:
version: latest
endpoint: builders

- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-single-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-single-buildx
- name: Install Task
id: install-task
uses: arduino/[email protected]
with:
version: 3.35.1

- name: Get version
id: get_version
run: echo "VERSION=$(task version)" >> "$GITHUB_ENV"

# Build multi-stage Docker image for kacsh.com
- name: Build Docker Robotf image
run: |
task docker-load
# Publish image to Internal Harbor Registry
- name: Push Image to Harbor
run: |
task docker-push
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.env
.streamlit/*
*/.DS_Store
*/*/.DS_Store
.DS_Store
./models
models/*
30 changes: 30 additions & 0 deletions .linters/yaml-linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Ref: https://yamllint.readthedocs.io/en/stable/configuration.html
---
extends: default

ignore: |
**.history/**
.github/workflows
rules:
empty-values: enable
document-start: disable
# line-length: disable
line-length:
level: warning
max: 350
allow-non-breakable-inline-mappings: true
indentation:
spaces: 2
indent-sequences: true
truthy:
allowed-values:
- "true"
- "false"
- "on"
quoted-strings:
quote-type: double
required: false
braces:
min-spaces-inside: 1
max-spaces-inside: 1
3 changes: 3 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"MD051": false
}
44 changes: 44 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
repos:
- repo: local
hooks:
- id: actionlint
name: Actionlint Workflows
description: Runs actionlint against workflow files
language: system
types: ["yaml"]
files: ^\.github/workflows/
entry: actionlint
stages: [commit, push, manual]
- id: markdownlint
name: Markdownlint files
description: Runs markdownlint against md files
language: system
types: ["markdown"]
files: .
entry: markdownlint-cli2 "*.md"
stages: [commit, push, manual]
- id: pylint
name: pylint files
description: Runs pylint against python files
language: python
types: ["python"]
files: .
entry: pylint **/*.py --fail-under=0
stages: [commit, push, manual]
- id: shellcheck
name: Shellcheck setup script
description: Runs shellcheck against script files
language: system
types: ["bash"]
files: scripts/setup.sh
entry: shellcheck scripts/setup.sh
stages: [commit, push, manual]
- id: yamllint
name: Yamllint files
description: Runs yamllint against non-workflow files
language: system
types: ["yaml"]
files: .
entry: yamllint -c .linters/yaml-linter.yml
stages: [commit, push, manual]
8 changes: 8 additions & 0 deletions Brewfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Project dependencies
brew 'actionlint'
brew 'go-task'
brew 'pre-commit'
brew 'shfmt'
brew 'shellcheck'
brew 'yamllint'
brew 'pylint'
Loading

0 comments on commit f47a789

Please sign in to comment.