Skip to content

Commit

Permalink
Initial
Browse files Browse the repository at this point in the history
  • Loading branch information
troykelly committed Sep 21, 2022
1 parent f97b9fd commit 2528ab3
Show file tree
Hide file tree
Showing 15 changed files with 758 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: Bug report
about: Create a report to help us improve
title: ""
labels: bug
assignees: ""
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behaviour:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behaviour**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Feature request
about: Suggest an idea for this project
title: ""
labels: enhancement
assignees: ""
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
8 changes: 8 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: daily
time: "06:00"
97 changes: 97 additions & 0 deletions .github/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
---
- name: "breaking-change"
color: ee0701
description: "A breaking change for existing users."
- name: "bugfix"
color: ee0701
description: >
Inconsistencies or issues which will cause
a problem for users or implementors.
- name: "documentation"
color: 0052cc
description: "Solely about the documentation of the project."
- name: "enhancement"
color: 1d76db
description: "Enhancement of the code, not introducing new features."
- name: "refactor"
color: 1d76db
description: "Improvement of existing code, not introducing new features."
- name: "performance"
color: 1d76db
description: "Improving performance, not introducing new features."
- name: "new-feature"
color: 0e8a16
description: "New features or options."
- name: "maintenance"
color: 2af79e
description: "Generic maintenance tasks."
- name: "ci"
color: 1d76db
description: "Work that improves the continue integration."
- name: "dependencies"
color: 1d76db
description: "Upgrade or downgrade of project dependencies."

- name: "in-progress"
color: fbca04
description: "Issue is currently being resolved by a developer."
- name: "stale"
color: fef2c0
description: >
There has not been activity on
this issue or PR for quite some time.
- name: "no-stale"
color: fef2c0
description: "This issue or PR is exempted from the stable bot."

- name: "security"
color: ee0701
description: "Marks a security issue that needs to be resolved asap."
- name: "incomplete"
color: fef2c0
description: "Marks a PR or issue that is missing information."
- name: "invalid"
color: fef2c0
description: "Marks a PR or issue that is missing information."

- name: "beginner-friendly"
color: 0e8a16
description: >
Good first issue for people wanting
to contribute to the project.
- name: "help-wanted"
color: 0e8a16
description: >
We need some extra helping hands or
expertise in order to resolve this.
- name: "hacktoberfest"
description: "Issues/PRs are participating in the Hacktoberfest."
color: fbca04
- name: "hacktoberfest-accepted"
description: "Issues/PRs are participating in the Hacktoberfest."
color: fbca04

- name: "priority-critical"
color: ee0701
description: >
This should be dealt with ASAP. Not fixing
this issue would be a serious error.
- name: "priority-high"
color: b60205
description: >
After critical issues are fixed, these should
be dealt with before any further issues.
- name: "priority-medium"
color: 0e8a16
description: "This issue may be useful, and needs some attention."
- name: "priority-low"
color: e4ea8a
description: "Nice addition, maybe... someday..."

- name: "major"
color: b60205
description: "This PR causes a major version bump in the version number."
- name: "minor"
color: 0e8a16
description: "This PR causes a minor version bump in the version number."
57 changes: 57 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
name-template: "Version $RESOLVED_VERSION"
tag-template: "v$RESOLVED_VERSION"
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
sort-direction: ascending

categories:
- title: "🚨 Breaking changes"
labels:
- "breaking-change"
- title: "✨ New features"
labels:
- "new-feature"
- title: "πŸ› Bug fixes"
labels:
- "bugfix"
- title: "πŸš€ Enhancements"
labels:
- "enhancement"
- "refactor"
- "performance"
- title: "🧰 Maintenance"
labels:
- "maintenance"
- "ci"
- title: "πŸ“š Documentation"
labels:
- "documentation"
- title: "⬆️ Dependency updates"
labels:
- "dependencies"

version-resolver:
major:
labels:
- "major"
- "breaking-change"
minor:
labels:
- "minor"
- "new-feature"
patch:
labels:
- "bugfix"
- "chore"
- "ci"
- "dependencies"
- "documentation"
- "enhancement"
- "performance"
- "refactor"
default: patch

template: |
## What’s changed
$CHANGES
147 changes: 147 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
---
name: CI

# yamllint disable-line rule:truthy
on:
push:
pull_request:
types:
- opened
- reopened
- synchronize
workflow_dispatch:

jobs:
information:
name: Gather add-on information
runs-on: ubuntu-latest
outputs:
containersha: ${{ steps.information.outputs.containersha }}
description: ${{ steps.information.outputs.description }}
environment: ${{ steps.information.outputs.environment }}
name: ${{ steps.information.outputs.name }}
version: ${{ steps.information.outputs.version }}
build_date: ${{ steps.information.outputs.build_date }}
api_url: ${{ steps.information.outputs.api_url }}
steps:
- name: ‡️ Check out code from GitHub
uses: actions/checkout@v3
- name: ℹ️ Gather version and environment
id: information
# yamllint disable rule:line-length
run: |
sha="${{ github.sha }}"
environment="edge"
version="${sha:0:7}"
echo "::set-output name=containersha::${version}"
if [[ "${{ github.event_name }}" = "release" ]]; then
version="${{ github.event.release.tag_name }}"
version="${version,,}"
version="${version#v}"
environment="stable"
if [[ "${{ github.event.release.prerelease }}" = "true" ]]; then
environment="beta"
fi
fi
echo "::set-output name=environment::${environment}"
echo "::set-output name=version::${version}"
echo "::set-output name=name::xteve with cuda ffmpeg ${environment}"
echo "::set-output name=description::xteve with cuda ffmpeg ${environment} in a container"
# yamllint enable rule:line-length

build:
name: πŸ‘· Build
needs:
- information
runs-on: ubuntu-latest
steps:
- name: ‡️ Check out code from GitHub
uses: actions/checkout@v3

- name: Install Latest Docker
# yamllint disable rule:line-length
run: |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install docker-ce
# yamllint enable rule:line-length

- name: πŸ“ Docker meta
id: meta
uses: docker/metadata-action@v4
with:
# list of Docker images to use as base name for tags
images: |
troykelly/xteve-nvidia-cuda-ffmpeg
ghcr.io/troykelly/xteve-nvidia-cuda-ffmpeg
# generate Docker tags based on the following events/attributes
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=sha
type=edge,enable=true,priority=700,prefix=,suffix=,branch=$repo.default_branch
- name: πŸ— Set up build cache
id: cache
uses: actions/cache@v3.0.8
with:
path: /tmp/.buildx-cache
# Key is named differently to avoid collision
key: ${{ runner.os }}-multi-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-multi-buildx
- name: πŸ— Set up QEMU
uses: docker/setup-qemu-action@v2

- name: πŸ— Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
install: true

- name: πŸ— Login to Docker Container Registry
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: πŸ— Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CI_PAT }}

- name: πŸš€ Build
uses: docker/build-push-action@v3
with:
push: true
builder: ${{ steps.buildx.outputs.name }}
context: ./
file: ./xteve/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-new
# yamllint disable-line rule:line-length
# platforms: linux/amd64,linux/386,linux/arm/v6,linux/arm/v7,linux/arm64/v8
platforms: linux/amd64
build-args: |
BUILD_DATE=${{ needs.information.outputs.version }}
BUILD_DESCRIPTION=${{ needs.information.outputs.description }}
BUILD_NAME=${{ needs.information.outputs.name }}
BUILD_REF=${{ github.sha }}
BUILD_REPOSITORY=${{ github.repository }}
BUILD_VERSION=${{ needs.information.outputs.version }}
# This ugly bit is necessary, or our cache will grow forever...
# Well until we hit GitHub's limit of 5GB :)
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: 🚚 Swap build cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
Loading

0 comments on commit 2528ab3

Please sign in to comment.