From e39519781f938b177bb2aa32e5fe63de0e5a802c Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Wed, 2 Mar 2022 11:50:57 -0600 Subject: [PATCH 1/4] Add github actions --- .github/dependabot.yml | 7 +++++++ .github/labeler.yml | 23 +++++++++++++++++++++++ .github/workflows/dependabot-issues.yml | 9 +++++++++ .github/workflows/label.yml | 22 ++++++++++++++++++++++ .github/workflows/shell-linter.yml | 11 +++++++++++ CODEOWNERS | 6 ++++++ 6 files changed, 78 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/labeler.yml create mode 100644 .github/workflows/dependabot-issues.yml create mode 100644 .github/workflows/label.yml create mode 100644 .github/workflows/shell-linter.yml create mode 100644 CODEOWNERS diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..583decf --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 +updates: + # Maintain dependencies for GitHub Actions + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" \ No newline at end of file diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000..de40377 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,23 @@ +repo: +- '*' + +GitHub-Action: +- .github/workflows/* + +Configs: +- configs/**/* + +Package-Files: +- pkg-files/**/* + +scripts: +- scripts/**/* + +debug: +- scripts/debug/**/* + +helpers: +- scripts/helpers/**/* + +installers: +- scripts/installers/**/* \ No newline at end of file diff --git a/.github/workflows/dependabot-issues.yml b/.github/workflows/dependabot-issues.yml new file mode 100644 index 0000000..99336d1 --- /dev/null +++ b/.github/workflows/dependabot-issues.yml @@ -0,0 +1,9 @@ +on: [pull_request] +name: Dependabot-Issue + +jobs: + dependabot-issue: + runs-on: ubuntu-latest + steps: + - name: Dependabot issue for PRs + uses: goatandsheep/dependabot-issue-action@v1.0.1 diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml new file mode 100644 index 0000000..ef3d7d5 --- /dev/null +++ b/.github/workflows/label.yml @@ -0,0 +1,22 @@ +# This workflow will triage pull requests and apply a label based on the +# paths that are modified in the pull request. +# +# To use this workflow, you will need to set up a .github/labeler.yml +# file with configuration. For more information, see: +# https://github.com/actions/labeler + +name: Labeler +on: [pull_request] + +jobs: + label: + + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + + steps: + - uses: actions/labeler@v4 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" \ No newline at end of file diff --git a/.github/workflows/shell-linter.yml b/.github/workflows/shell-linter.yml new file mode 100644 index 0000000..052dad7 --- /dev/null +++ b/.github/workflows/shell-linter.yml @@ -0,0 +1,11 @@ +on: [pull_request] +name: Shell-Linter + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v1 + - name: Run ShellCheck + uses: azohra/shell-linter@latest \ No newline at end of file diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..0af880c --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,6 @@ +# Lines starting with '#' are comments. +# Each line is a file pattern followed by one or more owners. +# Order is important. The last matching pattern has the most precedence. + +# These owners will be the default owners for everything in the repo. +* @ChrisTitusTech \ No newline at end of file From b37c415a88ee7361ff4ed733b6a7e0f32c9392b3 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Wed, 2 Mar 2022 12:16:51 -0600 Subject: [PATCH 2/4] Add some extra actions --- .github/workflows/combine.yml | 18 +++++++++++++ .github/workflows/dependabot-issues.yml | 9 ------- .github/workflows/generate-documentation.yml | 27 ++++++++++++++++++++ archtitus.sh | 1 + scripts/0-preinstall.sh | 1 + scripts/1-setup.sh | 1 + scripts/2-user.sh | 1 + scripts/3-post-setup.sh | 1 + scripts/startup.sh | 1 + 9 files changed, 51 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/combine.yml delete mode 100644 .github/workflows/dependabot-issues.yml create mode 100644 .github/workflows/generate-documentation.yml diff --git a/.github/workflows/combine.yml b/.github/workflows/combine.yml new file mode 100644 index 0000000..938011e --- /dev/null +++ b/.github/workflows/combine.yml @@ -0,0 +1,18 @@ +name: "Combine Dependabot PRs" +on: + workflow_dispatch: + +jobs: + combine-prs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2.3.3 + - uses: maadhattah/combine-dependabot-prs@main + with: + branchPrefix: "dependabot" + mustBeGreen: true + combineBranchName: "combined-prs" + ignoreLabel: "nocombine" + baseBranch: "main" + openPR: true + allowSkipped: false \ No newline at end of file diff --git a/.github/workflows/dependabot-issues.yml b/.github/workflows/dependabot-issues.yml deleted file mode 100644 index 99336d1..0000000 --- a/.github/workflows/dependabot-issues.yml +++ /dev/null @@ -1,9 +0,0 @@ -on: [pull_request] -name: Dependabot-Issue - -jobs: - dependabot-issue: - runs-on: ubuntu-latest - steps: - - name: Dependabot issue for PRs - uses: goatandsheep/dependabot-issue-action@v1.0.1 diff --git a/.github/workflows/generate-documentation.yml b/.github/workflows/generate-documentation.yml new file mode 100644 index 0000000..1f28199 --- /dev/null +++ b/.github/workflows/generate-documentation.yml @@ -0,0 +1,27 @@ +name: Generate Documentation + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Github Action genshdoc + id: action-genshdoc + uses: vargiuscuola/genshdoc@master + - name: genshdoc result + run: echo "The result of genshdoc Action was ${{ steps.action-genshdoc.outputs.result }}" + - name: Commit files + run: | + echo ${{ github.ref }} + git add . + git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" + git commit -m "CI: Automated build push" -a | exit 0 + - name: Push changes + if: github.ref == 'refs/heads/main' + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/archtitus.sh b/archtitus.sh index 693b248..dedd6c4 100755 --- a/archtitus.sh +++ b/archtitus.sh @@ -1,4 +1,5 @@ #!/bin/bash +#github-action genshdoc # Find the name of the folder the scripts are in set -a diff --git a/scripts/0-preinstall.sh b/scripts/0-preinstall.sh index b289307..3741b6d 100755 --- a/scripts/0-preinstall.sh +++ b/scripts/0-preinstall.sh @@ -7,6 +7,7 @@ # ██║ ██║██║ ██║╚██████╗██║ ██║ ██║ ██║ ██║ ╚██████╔╝███████║ # ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝ #------------------------------------------------------------------------- +#github-action genshdoc echo -ne " ------------------------------------------------------------------------- diff --git a/scripts/1-setup.sh b/scripts/1-setup.sh index 9f0e1ad..22860c6 100755 --- a/scripts/1-setup.sh +++ b/scripts/1-setup.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +#github-action genshdoc echo -ne " ------------------------------------------------------------------------- █████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗ diff --git a/scripts/2-user.sh b/scripts/2-user.sh index b1b2c43..2bb9646 100755 --- a/scripts/2-user.sh +++ b/scripts/2-user.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +#github-action genshdoc echo -ne " ------------------------------------------------------------------------- █████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗ diff --git a/scripts/3-post-setup.sh b/scripts/3-post-setup.sh index 34c67a0..d5cfd08 100755 --- a/scripts/3-post-setup.sh +++ b/scripts/3-post-setup.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +#github-action genshdoc echo -ne " ------------------------------------------------------------------------- █████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗ diff --git a/scripts/startup.sh b/scripts/startup.sh index baf0e75..8406227 100755 --- a/scripts/startup.sh +++ b/scripts/startup.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +#github-action genshdoc # This script will ask users about their prefrences # like disk, file system, timezone, keyboard layout, # user name, password, etc. From 77f3be9485e040ccca4e1f77ac21cd39d59db204 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Wed, 2 Mar 2022 12:38:11 -0600 Subject: [PATCH 3/4] Switch to Github's own lint action --- .github/workflows/linter.yml | 55 ++++++++++++++++++++++++++++++ .github/workflows/shell-linter.yml | 11 ------ README.md | 1 + 3 files changed, 56 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/linter.yml delete mode 100644 .github/workflows/shell-linter.yml diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml new file mode 100644 index 0000000..0149ccb --- /dev/null +++ b/.github/workflows/linter.yml @@ -0,0 +1,55 @@ +--- +################################# +################################# +## Super Linter GitHub Actions ## +################################# +################################# +name: Lint Code Base + +# +# Documentation: +# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions +# + +############################# +# Start the job on all push # +############################# +on: + push: + branches-ignore: [master, main] + # Remove the line above to run when pushing to master + pull_request: + branches: [master, main] + +############### +# Set the Job # +############### +jobs: + build: + # Name the Job + name: Lint Code Base + # Set the agent to run on + runs-on: ubuntu-latest + + ################## + # Load all steps # + ################## + steps: + ########################## + # Checkout the code base # + ########################## + - name: Checkout Code + uses: actions/checkout@v2 + with: + # Full git history is needed to get a proper list of changed files within `super-linter` + fetch-depth: 0 + + ################################ + # Run Linter against code base # + ################################ + - name: Lint Code Base + uses: github/super-linter@v4 + env: + VALIDATE_ALL_CODEBASE: false + DEFAULT_BRANCH: main + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/shell-linter.yml b/.github/workflows/shell-linter.yml deleted file mode 100644 index 052dad7..0000000 --- a/.github/workflows/shell-linter.yml +++ /dev/null @@ -1,11 +0,0 @@ -on: [pull_request] -name: Shell-Linter - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v1 - - name: Run ShellCheck - uses: azohra/shell-linter@latest \ No newline at end of file diff --git a/README.md b/README.md index ecba172..a3fa8c5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # ArchTitus Installer Script +[![GitHub Super-Linter](https://github.com/ChrisTitusTech/ArchTitus/workflows/Lint%20Code%20Base/badge.svg)](https://github.com/marketplace/actions/super-linter) From 681d4f443056ebebec76f5f93f76e5715fb503a9 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Wed, 2 Mar 2022 12:50:31 -0600 Subject: [PATCH 4/4] Update README.md --- README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a3fa8c5..afec16e 100644 --- a/README.md +++ b/README.md @@ -24,12 +24,15 @@ cd ArchTitus ``` ### System Description -This is completely automated arch install of the KDE desktop environment on arch using all the packages I use on a daily basis. +This is completely automated arch install. It includes prompts to select your desired desktop environment, window manager, AUR helper, and whether to do a full or minimal install. The KDE desktop environment on arch includes all the packages I use on a daily basis, as well as some customizations. ## Troubleshooting -__[Arch Linux Installation Guide](https://github.com/rickellis/Arch-Linux-Install-Guide)__ +__[Arch Linux RickEllis Installation Guide](https://github.com/rickellis/Arch-Linux-Install-Guide)__ +__[Arch Linux Wiki Installation Guide](https://wiki.archlinux.org/title/Installation_guide)__ + +The main script will generate .log files for every script that is run as part of the installation process. These log files contain the terminal output so you can review any warnings or errors that occurred during installation and aid in troubleshooting. ### No Wifi You can check if the WiFi is blocked by running `rfkill list`. @@ -47,6 +50,14 @@ After unblocking the WiFi, you can connect to it. Go through these 5 steps: #5: Find your network, and run `station [device name] connect [network name]`, enter your password and run `exit`. You can test if you have internet connection by running `ping google.com`, and then Press Ctrl and C to stop the ping test. +## Reporting Issues + +An issue is easier to resolve if it contains a few important pieces of information. +1. Chosen configuration from /configs/setup.conf (DONT INCLUDE PASSWORDS) +1. Errors seen in .log files +1. What commit/branch you used +1. Where you were installing (VMWare, Virtualbox, Virt-Manager, Baremetal, etc) + 1. If a VM, what was the configuration used. ## Credits - Original packages script was a post install cleanup script called ArchMatic located here: https://github.com/rickellis/ArchMatic