mirror of
https://github.com/kvz/bash3boilerplate.git
synced 2024-12-18 22:27:51 +00:00
Switch from using Travis to GitHub Actions (#141)
* First swing at GHA * Delete .travis.yml * Update ci.yml * Update main.sh * Update ci.yml * Update ci.yml
This commit is contained in:
parent
13d74bb4f1
commit
febd9e354b
47
.github/workflows/ci.yml
vendored
Normal file
47
.github/workflows/ci.yml
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
name: b3bp CI
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps :
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- uses: actions/setup-node@master
|
||||
with:
|
||||
node-version: 10.x
|
||||
- name: Get yarn cache directory path
|
||||
id : yarn-cache-dir-path
|
||||
run : echo "##[set-output name=dir;]$(yarn cache dir)"
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
- uses: sergioramos/yarn-actions/install@master
|
||||
with:
|
||||
frozen-lockfile: true
|
||||
- name: Test
|
||||
run : |
|
||||
yarn test
|
||||
- name: Website Build
|
||||
if : github.ref == 'refs/heads/master'
|
||||
run : |
|
||||
yarn inject
|
||||
yarn build:production
|
||||
- name: Website Deploy 🚀
|
||||
if : github.ref == 'refs/heads/master'
|
||||
uses: JamesIves/github-pages-deploy-action@3.7.1
|
||||
with:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
BRANCH : gh-pages # The branch the action should deploy to.
|
||||
FOLDER : website/_site # The folder the action should deploy.
|
||||
CLEAN : true # Automatically remove deleted files from the deploy branch
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -17,3 +17,5 @@ website/changelog.md
|
||||
website/faq.md
|
||||
website/index.md
|
||||
website/main.sh
|
||||
website/_includes/_generated_assets/app-production-body.html
|
||||
website/_includes/_generated_assets/app-production-head.html
|
||||
|
43
.travis.yml
43
.travis.yml
@ -1,43 +0,0 @@
|
||||
matrix:
|
||||
include:
|
||||
- os: linux
|
||||
sudo: false
|
||||
language: node_js
|
||||
node_js: 10
|
||||
- os: osx
|
||||
language: node_js
|
||||
node_js: 10
|
||||
env:
|
||||
global:
|
||||
- SCROLEX_MODE=passthru
|
||||
- secure: BeM6mpPEATdeFcAr/222QBZ9vRkZtU2WOi9QQy3mxsuDbWfM8RxYESIEJLipyhW9kXGoe6HGMqm4Kz9B/c4jrzeSXPpKnW7mIfnyqN+hhq1ctW9qPSqodu+fYNhdDxXh5wylml7hnIJzU70vFGrFknZRE2FYk5XvyHg2ImIKDJw=
|
||||
- secure: RJ5UpdXms9QkraylZ11OBfmcRrmKnb254Yj0yCDAvZmg+n+3jSTwMgGvPY8Ih8X/R1JeW3VTtFDkJXXPnjjfpNg1M91u4CAEUOMPciCudYcoF6GKb8psnOzneTTX5M7zuJSzknGdpv/foldxiPYxiY5Hn5bfjmikhAEl+QX/R0Y=
|
||||
- secure: BXf2buPt/DA09M5ZUdp/LpOWtUuz1mfCBopLyxvHv3Sl3ln+Az57wWsM2+Re+77lUOgihR2f6lXYfNUmQuSUo157rZPunQCqM/DJhK69KhREEB6SJDaJF3FVlnGla+Cwwb1IQUtMopqX9pBYD7w/zyWQFJCi20O57JEVIdfZZS8=
|
||||
- secure: AaDI3OLTcwau2tu9jTtR0eHpylSUudYua9aKH3C540Lm2scQhQcT4IbMa6KXgrY+1UchapS9gUuClH8QwgJo61tJjtOqvmCgZ2EkmZg68pzw/25zwv7LSzYASbZvKahulV/giZdxFLGOpPhNhKbG70/owYXjKFENi5LoZKc8Y+c=
|
||||
- secure: Fm+WUa8DuFBlx86YoRjPEuYc2Z21GU+bWToJ5CQ0FkJt/6tDX2wlZq0zz3/Zj9oQOV05I43CWGxwDoF4aulFYqHNYv9Axra+uDRF9oyu2KfYyOWblweqz8vzwGN89lRSHSwWlIRhcDBP4AUHBx/gR772Ymq7oR7lWuoxLQ83UPI=
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- debian-sid
|
||||
before_install:
|
||||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get install --allow-unauthenticated
|
||||
-y cabal-install; fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then cabal update; fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then cabal v1-install ShellCheck; fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then which gsed || brew install gnu-sed; fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then which gtimeout || brew install coreutils;
|
||||
fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then which bundle || gem install bundler; fi
|
||||
- bash --version
|
||||
- awk --version
|
||||
before_cache:
|
||||
- rm -f ./node_modules/.bin/which
|
||||
script: test/acceptance.sh
|
||||
deploy:
|
||||
skip_cleanup: true
|
||||
provider: script
|
||||
script: "./node_modules/lanyon/scripts/ci-deploy.sh"
|
||||
on:
|
||||
branch: master
|
||||
condition: "$TRAVIS_OS_NAME = linux"
|
1
main.sh
1
main.sh
@ -280,6 +280,7 @@ if [[ "${__b3bp_tmp_opts:-}" ]]; then
|
||||
# repeatable flags, they increcemnt
|
||||
__b3bp_tmp_varname="arg_${__b3bp_tmp_opt:0:1}"
|
||||
debug "cli arg ${__b3bp_tmp_varname} = (${__b3bp_tmp_default}) -> ${!__b3bp_tmp_varname}"
|
||||
# shellcheck disable=SC2004
|
||||
__b3bp_tmp_value=$((${!__b3bp_tmp_varname} + 1))
|
||||
printf -v "${__b3bp_tmp_varname}" '%s' "${__b3bp_tmp_value}"
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user