Skip to content

Commit

Permalink
Merge pull request #179 from shitwolfymakes/main
Browse files Browse the repository at this point in the history
Main Branch Containerization and extras
  • Loading branch information
1337-server authored Jun 23, 2022
2 parents 06b4f9f + 11a876c commit 73288bc
Show file tree
Hide file tree
Showing 49 changed files with 1,161 additions and 342 deletions.
223 changes: 223 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,223 @@
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### Python template
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# ARM-specific
.github/
.dockerignore
.gitignore
.gitmodules

*.yml
*.md
!README.md
Dockerfile
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ name: "CodeQL"

on:
push:
branches: [ v2_master, v2_devel ]
branches: [ main, v2_master, v2_devel ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ v2_master, v2_devel ]
branches: [ main, v2_master, v2_devel ]
schedule:
- cron: '15 6 * * 3'

Expand Down
37 changes: 0 additions & 37 deletions .github/workflows/docker-publish.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ name: "Quality Checks"
on:
# Triggers the workflow on push or pull request events but only for the v2.5.0_dev branch
push:
branches: [ v2_devel, v2_master ]
branches: [ main, v2_devel, v2_master ]
pull_request:
branches: [ v2_devel, v2_master]
branches: [ main, v2_devel, v2_master]


# Allows you to run this workflow manually from the Actions tab
Expand Down Expand Up @@ -75,6 +75,6 @@ jobs:
#flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Fix config files
run: |
cp docs/arm.yaml.sample arm.yaml
cp setup/arm.yaml arm.yaml
- name: Run A.R.M ui
run: timeout 1 python ./arm/runui.py || code=$?; if [[ $code -ne 124 && $code -ne 0 ]]; then exit $code; fi
95 changes: 95 additions & 0 deletions .github/workflows/publish-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: publish-image

# 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:
push:
pull_request:
branches: [ main, v2_devel, docker ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# use DOCKERHUB_USERNAME as the name maybe different from the github username
IMAGE_NAME: ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}
TAG: latest

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
-
name: Checkout repository
uses: actions/checkout@v2

-
name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v5.1

-
name: Set tag for non-default branch
if: steps.branch-name.outputs.is_default == 'false'
run: |
echo "Branch name is ${{ env.GITHUB_REF_NAME }}"
echo "TAG=${{ env.GITHUB_REF_NAME }}" >> $GITHUB_ENV
# Workaround: https://github.com/docker/build-push-action/issues/461
-
name: Setup Docker buildx
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf

# Login against all registries
# https://github.com/docker/login-action
-
name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

-
name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
-
name: Extract Docker metadata
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

# Build and push Docker image with Buildx
# https://github.com/docker/build-push-action
-
name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ env.IMAGE_NAME }}:${{ env.TAG }}
labels: ${{ steps.meta.outputs.labels }}

-
name: retag and push multiplatform images to multiple registries
uses: akhilerm/tag-push-action@v2.0.0
with:
src: docker.io/${{ env.IMAGE_NAME }}:${{ env.TAG }}
# make sure the github name is correct
dst: ${{ env.REGISTRY }}/${{ github.actor }}/${{ github.event.repository.name }}:${{ env.TAG }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -180,3 +180,4 @@ removed/*
*/arm_wrapper.sh
*/arm.conf
*/arm.yaml
/installed
Loading

0 comments on commit 73288bc

Please sign in to comment.