Skip to content

Configure Renovate #195

Configure Renovate

Configure Renovate #195

# http://patorjk.com/software/taag/#p=display&f=ANSI%20Shadow&t=test
name: Continuous Integration
on:
pull_request:
branches:
- master
jobs:
#############################################################################
#
# ███████╗██╗██╗ ███████╗ ██████╗ ███████╗██╗ █████╗ ████████╗███████╗██████╗
# ██╔════╝██║██║ ██╔════╝ ██╔══██╗██╔════╝██║ ██╔══██╗╚══██╔══╝██╔════╝██╔══██╗
# █████╗ ██║██║ █████╗ ██████╔╝█████╗ ██║ ███████║ ██║ █████╗ ██║ ██║
# ██╔══╝ ██║██║ ██╔══╝ ██╔══██╗██╔══╝ ██║ ██╔══██║ ██║ ██╔══╝ ██║ ██║
# ██║ ██║███████╗███████╗ ██║ ██║███████╗███████╗██║ ██║ ██║ ███████╗██████╔╝
# ╚═╝ ╚═╝╚══════╝╚══════╝ ╚═╝ ╚═╝╚══════╝╚══════╝╚═╝ ╚═╝ ╚═╝ ╚══════╝╚═════╝
#
#############################################################################
file-lint:
name: General File Lint
runs-on: ubuntu-latest
strategy:
matrix:
command:
- cr
- crlf
- trailing-newline
- trailing-single-newline
- trailing-space
- utf8
- utf8-bom
steps:
- uses: actions/checkout@master
- uses: dogmatic69/actions/file/lint/awesome-ci@master
with:
command: file-${{ matrix.command }}
makefile-lint:
name: Makefile Lint
runs-on: ubuntu-latest
steps:
- uses: dogmatic69/actions/file/lint/checkmake@master
file-done:
name: Done
runs-on: ubuntu-latest
needs: [file-lint, makefile-lint]
steps:
- run: true
#############################################################################
#
# ██████╗ ██╗████████╗ ██████╗ ███████╗██╗ █████╗ ████████╗███████╗██████╗
# ██╔════╝ ██║╚══██╔══╝ ██╔══██╗██╔════╝██║ ██╔══██╗╚══██╔══╝██╔════╝██╔══██╗
# ██║ ███╗██║ ██║ ██████╔╝█████╗ ██║ ███████║ ██║ █████╗ ██║ ██║
# ██║ ██║██║ ██║ ██╔══██╗██╔══╝ ██║ ██╔══██║ ██║ ██╔══╝ ██║ ██║
# ╚██████╔╝██║ ██║ ██║ ██║███████╗███████╗██║ ██║ ██║ ███████╗██████╔╝
# ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝╚══════╝╚══════╝╚═╝ ╚═╝ ╚═╝ ╚══════╝╚═════╝
#
#############################################################################
git-lint:
name: Git Lint
runs-on: ubuntu-latest
strategy:
matrix:
command:
- conflicts
- ignored
steps:
- uses: actions/checkout@master
with:
fetch-depth: 0
- uses: dogmatic69/actions/git/lint/awesome-ci@master
with:
command: git-${{ matrix.command }}
gitleaks:
name: GitLeaks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
fetch-depth: 0
- uses: dogmatic69/actions/git/audit/gitleaks@master
with:
command: git-${{ matrix.command }}
git-done:
name: Done
runs-on: ubuntu-latest
needs: [git-lint, gitleaks]
steps:
- run: true
#############################################################################
#
# ██████╗ ██████╗ ██████╗██╗ ██╗███████╗██████╗ ██████╗ ███████╗██╗ █████╗ ████████╗███████╗██████╗
# ██╔══██╗██╔═══██╗██╔════╝██║ ██╔╝██╔════╝██╔══██╗ ██╔══██╗██╔════╝██║ ██╔══██╗╚══██╔══╝██╔════╝██╔══██╗
# ██║ ██║██║ ██║██║ █████╔╝ █████╗ ██████╔╝ ██████╔╝█████╗ ██║ ███████║ ██║ █████╗ ██║ ██║
# ██║ ██║██║ ██║██║ ██╔═██╗ ██╔══╝ ██╔══██╗ ██╔══██╗██╔══╝ ██║ ██╔══██║ ██║ ██╔══╝ ██║ ██║
# ██████╔╝╚██████╔╝╚██████╗██║ ██╗███████╗██║ ██║ ██║ ██║███████╗███████╗██║ ██║ ██║ ███████╗██████╔╝
# ╚═════╝ ╚═════╝ ╚═════╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═╝╚══════╝╚══════╝╚═╝ ╚═╝ ╚═╝ ╚══════╝╚═════╝
#
#############################################################################
audit-trivy:
name: Trivy Scan
runs-on: ubuntu-latest
strategy:
matrix:
image:
- box-node-api
- box-python-api
- box-ui
steps:
- uses: actions/checkout@master
- name: build
run: docker build -t ${{ matrix.image }} ./${{ matrix.image }}
- uses: dogmatic69/actions/docker/audit/trivy@master
with:
image: ${{ matrix.image }}
path: ./${{ matrix.image }}
lint-hadolint:
name: Hadolint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: dogmatic69/actions/docker/lint/hadolint@master
docker-done:
name: Done
runs-on: ubuntu-latest
needs: [audit-trivy, lint-hadolint]
steps:
- run: true
#############################################################################
#
# ██████╗ ██╗ ██╗██████╗ ██╗ ██╗███████╗██╗ ██╗
# ██╔══██╗██║ ██║██╔══██╗██║ ██║██╔════╝██║ ██║
# ██████╔╝██║ ██║██████╔╝██║ ██║███████╗███████║
# ██╔═══╝ ██║ ██║██╔══██╗██║ ██║╚════██║██╔══██║
# ██║ ╚██████╔╝██████╔╝███████╗██║███████║██║ ██║
# ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝╚═╝╚══════╝╚═╝ ╚═╝
#
#############################################################################
publish:
name: Code Publish
runs-on: ubuntu-latest
needs: [file-done, git-done, docker-done]
strategy:
matrix:
component:
- box-node-api
- box-python-api
- box-ui
steps:
- uses: actions/checkout@master
- name: publish the package
run: |
cd ${{ matrix.component }}
DOCKER_SERVICE=${{ matrix.component }} \
DOCKER_TOKEN=${{ secrets.GITHUB_TOKEN }} \
DOCKER_USER=${{ github.actor }} \
make publish
#############################################################################
#
# ██████╗ ██████╗ ██████╗ ██╗███████╗ ██████╗████████╗
# ██╔══██╗██╔══██╗██╔═══██╗ ██║██╔════╝██╔════╝╚══██╔══╝
# ██████╔╝██████╔╝██║ ██║ ██║█████╗ ██║ ██║
# ██╔═══╝ ██╔══██╗██║ ██║██ ██║██╔══╝ ██║ ██║
# ██║ ██║ ██║╚██████╔╝╚█████╔╝███████╗╚██████╗ ██║
# ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚════╝ ╚══════╝ ╚═════╝ ╚═╝
#
#############################################################################
project-checks:
name: Project Specific Checks
runs-on: ubuntu-latest
strategy:
matrix:
image:
- box-node-api
- box-python-api
- box-ui
steps:
- uses: actions/checkout@master
- name: Lint
run: make -C ${{ matrix.image }} lint
- name: Test
run: make -C ${{ matrix.image }} test
- name: Audit
run: make -C ${{ matrix.image }} audit
# slack-pr-ready:
# runs-on: ubuntu-latest
# needs: [file-done, git-done, docker-done]
# steps:
# - name: Extract branch name
# shell: bash
# run: echo "##[set-output name=id;]$(echo ${GITHUB_REF#refs/pull/} | sed 's/\/merge//')"
# id: pr-id
# - name: PR Ready
# uses: 8398a7/action-slack@v2
# with:
# status: custom
# payload: |
# {
# text: ":shipit-parrot: PR is ready for review!",
# attachments: [{
# "author_name": "@${{ github.actor }}",
# fallback: 'fallback',
# color: 'good',
# title: 'CI Result',
# text: 'Succeeded',
# fields: [{
# title: 'PR Link',
# value: "https://github.com/${{ github.repository }}/pull/${{ steps.pr-id.outputs.id }}",
# short: false
# }],
# actions: [{
# }]
# }]
# }
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
# # publish-npm:
# # runs-on: ubuntu-latest
# # # needs: [test, scan]
# # strategy:
# # matrix:
# # component: ['box-node-api']
# # steps:
# # - uses: actions/checkout@master
# # - name: publish the package
# # run: |
# # yarn config set _authToken ${{ secrets.GITHUB_TOKEN }}
# # echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> "${{ matrix.component }}/files/src/.npmrc"
# # cp "${{ matrix.component }}/files/src/.npmrc" ~/.npmrc
# # make -C ${{ matrix.component }} publish-npm NODE_PATH=./files/src/