From 0a5f6383d41b466f04284d51c1dd56fb6724abcf Mon Sep 17 00:00:00 2001
From: Jordon Bedwell <jordon@envygeeks.io>
Date: Thu, 30 Apr 2020 08:01:10 -0500
Subject: [PATCH] Move to Github Actions

---
 .github/ISSUE_TEMPLATE/bug_report.md      | 61 -----------------------
 .github/ISSUE_TEMPLATE/feature_request.md | 22 --------
 .github/pull_request_template.md          | 14 ------
 .github/workflows/build.yml               | 30 +++++++++++
 .github/workflows/deploy.yml              | 57 +++++++++++++++++++++
 script/build                              |  7 +--
 script/install                            | 20 --------
 script/travis                             |  7 ---
 8 files changed, 91 insertions(+), 127 deletions(-)
 delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md
 delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md
 delete mode 100644 .github/pull_request_template.md
 create mode 100644 .github/workflows/build.yml
 create mode 100644 .github/workflows/deploy.yml
 delete mode 100755 script/install
 delete mode 100755 script/travis

diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
deleted file mode 100644
index cbc4350..0000000
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ /dev/null
@@ -1,61 +0,0 @@
----
-name: Bug Report
-about: Report an Issue!
----
-
-<!--
-  If this is a security related bug, please email the maintainer of
-  this repository (found via `security`) and let them know in private...
-  all security issues are handled promptly, and quickly, however an
-  early release could severely impact people.
--->
-
-- [ ] I tried updating to the latest version
-  - [ ] I can't, there is an issue
-  - [ ] This is about an < latest
-    - [ ] I understand older versions may be unsupported
-- [ ] I Am on Windows
-  - [ ] Ubuntu Bash on Windows
-  - [ ] Fedora Bash on Windows
-  - [ ] Other  Bash on Windows
-- [ ] I Am on Linux
-  - [ ] Ubuntu
-  - [ ] Fedora
-  - [ ] CentOS
-  - [ ] Redhat
-  - [ ] Debian
-- [ ] I am on macOS 10.13
-- [ ] I am on macOS 10.14
-- [ ] I'm on Docker
-  - [ ] I understand Docker may be unsupported
-
-## Description
-
-<!--
-  Replace this with a description of your issue.  Try to be as
-  detailed as you can, because the lack of a detailed description
-  will not help us reproduce it, and if we cannot reproduce and
-  you do not answer, your ticket could be closed.
--->
-
-## Steps
-
-- Step 1
-- Step 2
-- Step 3
-
-## Output
-
-```sh
-# Doing stuff.
-# Doing more stuff.
-# Oh no error.
-```
-
-## Expected
-
-<!--
-  Replace this with what you expected to happen.
-  Sometimes there are bugs, sometimes it's just a feature,
-  but it's always nice to know what you wanted.
--->
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
deleted file mode 100644
index e869739..0000000
--- a/.github/ISSUE_TEMPLATE/feature_request.md
+++ /dev/null
@@ -1,22 +0,0 @@
----
-name: Feature Request
-about: Suggest an Idea!
----
-
-- [ ] This feature is not on the latest version
-
-## Request
-
-<!--
-  Replace this with a description of what you would like,
-  make sure to include as much detail as you can so that your
-  feature can be implemented quickly if accepted.
--->
-
-## Examples
-
-```sh
-# Your example
-# Maybe multiple
-# Examples?
-```
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
deleted file mode 100644
index a57058b..0000000
--- a/.github/pull_request_template.md
+++ /dev/null
@@ -1,14 +0,0 @@
-- [ ] I have added or updated the specs/tests.
-- [ ] I have verified that the specs/tests pass on my computer.
-- [ ] I have not attempted to bump, or alter versions.
-- [ ] This is a documentation change.
-- [ ] This is a source change.
-
-## Description
-
-<!--
-  What issue are you trying to resolve?
-  It's always nice to get a brief description.
-  Note: you should provide the same in your commit message.
-    not everybody uses Github's Web UI.
--->
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..ca1a601
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,30 @@
+name: 'Pull'
+on:
+  - pull_request
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    timeout-minutes: 360
+    name: 'Build'
+    strategy:
+      matrix:
+        env:
+          - jekyll:latest
+          - builder:pages
+          - minimal:pages
+          - jekyll:pages
+    steps:
+      - uses: actions/checkout@v2
+      - uses: actions/setup-ruby@v1
+        with:
+          ruby-version: '2.x'
+      - run: bundle install
+      - run: |
+          echo $'{\n    "experimental": true\n}' | \
+            sudo tee /etc/docker/daemon.json
+          sudo systemctl restart docker
+        name: 'docker experimental'
+      - run: docker-template build $DOCKER_REPO --no-push --force --squash
+        env:
+          RUBYOPT: "-W0"
+          DOCKER_REPO: "${{join(matrix.env, ' ')}}"
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
new file mode 100644
index 0000000..264d526
--- /dev/null
+++ b/.github/workflows/deploy.yml
@@ -0,0 +1,57 @@
+name: 'Push'
+on:
+  push:
+    branches:
+      - master
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    timeout-minutes: 360
+    name: 'Build'
+    strategy:
+      fail-fast: false
+      matrix:
+        env:
+          -
+            - jekyll:4.0.0
+            - jekyll:stable
+            - jekyll:latest
+            - jekyll:4.0
+            - jekyll:4
+          -
+            - builder:4.0.0
+            - builder:stable
+            - builder:latest
+            - builder:4.0
+            - builder:4
+          -
+            - minimal:4.0.0
+            - minimal:stable
+            - minimal:latest
+            - minimal:4.0
+            - minimal:4
+          - builder:pages
+          - minimal:pages
+          - jekyll:pages
+    steps:
+      - uses: actions/checkout@v2
+      - uses: actions/setup-ruby@v1
+        with:
+          ruby-version: '2.x'
+      - run: bundle install
+      - run: |
+          echo $'{\n    "experimental": true\n}' | \
+            sudo tee /etc/docker/daemon.json
+          sudo systemctl restart docker
+        name: 'docker experimental'
+      - name: 'docker login'
+        run: |
+          echo "${{secrets.DOCKER_PASSWORD}}" | docker login \
+            --username ${{secrets.DOCKER_USERNAME}} \
+            --password-stdin
+      - run: |
+          docker-template build $DOCKER_REPO --no-push --force --squash
+          docker-template push  $DOCKER_REPO
+        env:
+          RUBYOPT: "-W0"
+          DOCKER_REPO: "${{join(matrix.env, ' ')}}"
diff --git a/script/build b/script/build
index 88a5ffb..59ef193 100755
--- a/script/build
+++ b/script/build
@@ -4,7 +4,8 @@
 # Author: Jordon Bedwell
 script/install
 
-[[ "$1" ]] && export $DOCKER_REPO="$1"
-bundle exec docker-template build $DOCKER_REPO \
-  --no-push --force --squash || \
+[[ "$1" ]] && export DOCKER_REPO="$1"
+echo "$DOCKER_REPO"
+exit 0
+bundle exec docker-template build "$DOCKER_REPO" --no-push --force --squash || \
       exit $?
diff --git a/script/install b/script/install
deleted file mode 100755
index 3b7d454..0000000
--- a/script/install
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/bash
-# Copyright: 2017 - 2018 - MIT License
-# Source: https://github.com/envygeeks/devfiles
-# Author: Jordon Bedwell
-[ "$DEBUG" = "true" ] && set -x
-set -e
-
-f=script/script.d/install
-if [ "$SKIP_SCRIPTD" != "true" ] && [ -x $f ]; then
-  exec $f "$@"
-else
-  if [[ "$CI" != "true" ]]; then
-    bundle check 1>/dev/null 2>&1 && bundle update ||
-    bundle install --path vendor/bundle
-    bundle clean
-  else
-    sudo mkdir -p /etc/docker
-    sudo service docker restart
-  fi
-fi
diff --git a/script/travis b/script/travis
deleted file mode 100755
index 33832a5..0000000
--- a/script/travis
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-set -e
-
-# What we want to run on the CI.
-for v in install build deploy; do
-  script/$v
-done
-- 
GitLab