Skip to content

Commit

Permalink
NordVPN support + Plex on host + Github Actions (Release + semver) (#16)
Browse files Browse the repository at this point in the history
* Added backup entries to .gitignore Added certs to the backup Rearranging Github files Automate semantic versioning through Github Actions Automate release generation through Github Actions Adding devContainers to the repository to facilitate development Plex network changed to  for better performance Added support for NordVPN (untested)

* Moving to right folder

* Changing variables

* Changing variables

* Pre-commit fixes

* Adding pre-commit CI and removing Docker validation for now

* Rename

* Remove dry-run
  • Loading branch information
ivan-pinatti authored Apr 27, 2023
1 parent 57f4e52 commit cdfd561
Show file tree
Hide file tree
Showing 38 changed files with 1,665 additions and 1,565 deletions.
48 changes: 48 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"name": "Ubuntu",
"image": "mcr.microsoft.com/devcontainers/base:jammy",
"features": {
"ghcr.io/devcontainers/features/python:1": {},
"ghcr.io/jungaretti/features/make:1": {},
"ghcr.io/devcontainers-contrib/features/pre-commit:2": {},
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
},
"customizations": {
"vscode": {
"extensions": [
"adpyke.codesnap",
"alefragnani.Bookmarks",
"bierner.emojisense",
"codezombiech.gitignore",
"DavidAnson.vscode-markdownlint",
"donjayamanne.githistory",
"DotJoshJohnson.xml",
"elagil.pre-commit-helper",
"esbenp.prettier-vscode",
"mhutchie.git-graph",
"mikestead.dotenv",
"moshfeu.compare-folders",
"ms-azuretools.vscode-docker",
"ms-vscode-remote.remote-containers",
"naumovs.color-highlight",
"oderwat.indent-rainbow",
"PKief.material-icon-theme",
"qwtel.sqlite-viewer",
"redhat.vscode-yaml",
"streetsidesoftware.code-spell-checker",
"vscode-icons-team.vscode-icons",
"waderyan.gitblame",
"yzhang.markdown-all-in-one",
"ms-vscode.makefile-tools"
]
}
},
"mounts": [
"source=${localEnv:HOME}/.bash_profile,target=/home/vscode/.bash_profile,type=bind,consistency=cached",
"source=${localEnv:HOME}/.bash_aliases,target=/home/vscode/.bash_aliases,type=bind,consistency=cached",
"source=${localEnv:HOME}/.bashrc,target=/home/vscode/.bashrc,type=bind,consistency=cached",
"source=${localEnv:HOME}/.gitconfig,target=/home/vscode/.gitconfig,type=bind,consistency=cached",
"source=${localEnv:HOME}/.ssh/,target=/home/vscode/.ssh/,type=bind,consistency=cached"
]
}
8 changes: 6 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ TIMEZONE=America/Toronto
UMASK=022
DOMAIN=localhost

# VPN Configuration
VPN_PROVIDER=protonvpn
# VPN Configurations
VPN_PROVIDER=protonvpn # or nordvpn
PROTONVPN_COUNTRY_AND_SERVER=nl-free-127.protonvpn.net
PROTONVPN_KEY=KLjfIMiuxPskM4+DaSUDmL2uSIYKJ9Wap+CHvs0Lfkw=
NORDVPN_TOKEN=f6f2bb45kM4+DaSUDLjfIMiJ9Wap+CSUDmL2uS
NORDVPN_COUNTRY_AND_OR_SERVER=

# Folders
CERTIFICATES_FOLDER=./certs
Expand Down Expand Up @@ -51,6 +53,7 @@ READARR_PROFILE=enabled
SONARR_PROFILE=enabled

# NOT Default Apps' Profiles (enabled/disabled)
NORDVPN_PROFILE=disabled
PROWLARR_PROFILE=disabled

# Apps Versions
Expand All @@ -63,6 +66,7 @@ LAZYLIBRARIAN_VERSION=latest
LIDARR_VERSION=latest
MYLAR_VERSION=latest
NGINX_VERSION=stable-alpine
NORDVPN_VERSION=latest
NZBGET_VERSION=latest
NZBHYDRA2_VERSION=latest
PLEX_VERSION=latest
Expand Down
File renamed without changes.
37 changes: 37 additions & 0 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Merge
on:
push:
branches:
- main

jobs:
create_tag:
name: Create Tag
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
previous_tag: ${{ steps.tag_version.outputs.previous_tag }}
previous_version: ${{ steps.tag_version.outputs.previous_version }}
new_tag: ${{ steps.tag_version.outputs.new_tag }}
new_version: ${{ steps.tag_version.outputs.new_version }}
changelog: ${{ steps.tag_version.outputs.changelog }}
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v3

- name: Create Tag
id: tag_version
uses: mathieudutour/github-tag-action@v5.5
with:
dry_run: false
github_token: ${{ secrets.GITHUB_TOKEN }}
release_branches: .*

- name: Create a GitHub release
id: create_release
uses: ncipollo/release-action@v1.12.0
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}
26 changes: 26 additions & 0 deletions .github/workflows/pull-request-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: PR Validation
on:
pull_request:
branches:
- main

jobs:
pr_check:
name: Code Check
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Python Setup
uses: actions/setup-python@v4
with:
python-version: 3.11.3

- name: Pre-commit Run
uses: pre-commit/action@v3.0.0

- name: Pre-commit CI
uses: pre-commit-ci/lite-action@v1.0.1
if: always()
11 changes: 7 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@
# dotenv ###
.env

# Backup Folder
backup/**

# Docker-compose dev file
docker-compose.dev..yml
docker-compose.dev.yml

# Backup files
certs.backup.**
configs.backup.**
.env.backup.**
backup/**
24 changes: 18 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repos:

# Prettier
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.6
rev: v3.0.0-alpha.9-for-vscode
hooks:
- id: prettier

Expand All @@ -24,8 +24,20 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace

# Docker-Compose hooks
- repo: https://github.com/IamTheFij/docker-pre-commit
rev: v3.0.1
hooks:
- id: docker-compose-check
# # Docker-Compose hooks
# - repo: https://github.com/IamTheFij/docker-pre-commit
# rev: v3.0.1
# hooks:
# - id: docker-compose-check

ci:
autofix_commit_msg: |
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
autofix_prs: true
autoupdate_branch: ""
autoupdate_commit_msg: "[pre-commit.ci] pre-commit autoupdate"
autoupdate_schedule: weekly
skip: []
submodules: false
Loading

0 comments on commit cdfd561

Please sign in to comment.