Skip to content

Commit 67eca1b

Browse files
Merge branch 'version-two'
2 parents 79d0a8f + 964be5b commit 67eca1b

File tree

13 files changed

+420
-0
lines changed

13 files changed

+420
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Build Changelog
2+
on:
3+
release:
4+
types: [created, edited]
5+
6+
jobs:
7+
build-changelog:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
with:
12+
fetch-depth: 0
13+
- uses: mikepenz/release-changelog-builder-action@v3
14+
with:
15+
owner: 'jeremykenedy'
16+
repo: 'laravel-spa'
17+
ignorePreReleases: 'false'
18+
fetchReleaseInformation: 'true'
19+
token: ${{ secrets.GITHUB_TOKEN }}
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/codacy.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
# This workflow checks out code, performs a Codacy security scan
7+
# and integrates the results with the
8+
# GitHub Advanced Security code scanning feature. For more information on
9+
# the Codacy security scan action usage and parameters, see
10+
# https://github.com/codacy/codacy-analysis-cli-action.
11+
# For more information on Codacy Analysis CLI in general, see
12+
# https://github.com/codacy/codacy-analysis-cli.
13+
14+
name: Codacy Security Scan
15+
16+
on:
17+
push:
18+
branches: [ "master", "main" ]
19+
pull_request:
20+
# The branches below must be a subset of the branches above
21+
branches: [ "master" ]
22+
schedule:
23+
- cron: '31 16 * * 6'
24+
25+
permissions:
26+
contents: read
27+
28+
jobs:
29+
codacy-security-scan:
30+
permissions:
31+
contents: read # for actions/checkout to fetch code
32+
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
33+
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
34+
name: Codacy Security Scan
35+
runs-on: ubuntu-latest
36+
steps:
37+
# Checkout the repository to the GitHub Actions runner
38+
- name: Checkout code
39+
uses: actions/checkout@v4
40+
41+
# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
42+
- name: Run Codacy Analysis CLI
43+
uses: codacy/codacy-analysis-cli-action@d840f886c4bd4edc059706d09c6a1586111c540b
44+
with:
45+
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
46+
# You can also omit the token and run the tools that support default configurations
47+
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
48+
verbose: true
49+
output: results.sarif
50+
format: sarif
51+
# Adjust severity of non-security issues
52+
gh-code-scanning-compat: true
53+
# Force 0 exit code to allow SARIF file generation
54+
# This will handover control about PR rejection to the GitHub side
55+
max-allowed-issues: 2147483647
56+
57+
# Upload the SARIF file generated in the previous step
58+
- name: Upload SARIF results file
59+
uses: github/codeql-action/upload-sarif@v3
60+
with:
61+
sarif_file: results.sarif

.github/workflows/codeql.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: 'CodeQL'
13+
14+
on:
15+
push:
16+
branches: ['master']
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: ['master']
20+
schedule:
21+
- cron: '24 14 * * 5'
22+
23+
jobs:
24+
analyze:
25+
name: Analyze
26+
runs-on: ubuntu-latest
27+
permissions:
28+
actions: read
29+
contents: read
30+
security-events: write
31+
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
language: ['javascript']
36+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
38+
39+
steps:
40+
- name: Checkout repository
41+
uses: actions/checkout@v3
42+
43+
# Initializes the CodeQL tools for scanning.
44+
- name: Initialize CodeQL
45+
uses: github/codeql-action/init@v2
46+
with:
47+
languages: ${{ matrix.language }}
48+
# If you wish to specify custom queries, you can do so here or in a config file.
49+
# By default, queries listed here will override any specified in a config file.
50+
# Prefix the list here with "+" to use these queries and those in the config file.
51+
52+
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
53+
# queries: security-extended,security-and-quality
54+
55+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
56+
# If this step fails, then you should remove it and run the build manually (see below)
57+
- name: Autobuild
58+
uses: github/codeql-action/autobuild@v2
59+
60+
# ℹ️ Command-line programs to run using the OS shell.
61+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
62+
63+
# If the Autobuild fails above, remove it and uncomment the following three lines.
64+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
65+
66+
# - run: |
67+
# echo "Run, Build Application using script"
68+
# ./location_of_script_within_repo/buildscript.sh
69+
70+
- name: Perform CodeQL Analysis
71+
uses: github/codeql-action/analyze@v2
72+
with:
73+
category: '/language:${{matrix.language}}'
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependency Review Action
2+
#
3+
# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.
4+
#
5+
# Source repository: https://github.com/actions/dependency-review-action
6+
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
7+
name: 'Dependency Review'
8+
on: [pull_request]
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
dependency-review:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: 'Checkout Repository'
18+
uses: actions/checkout@v3
19+
- name: 'Dependency Review'
20+
uses: actions/dependency-review-action@v2

.github/workflows/deploy.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Deploy
2+
3+
# Trigger the workflow on push and
4+
# pull request events on the released branch
5+
on:
6+
push:
7+
branches:
8+
- released
9+
pull_request:
10+
types: [approved]
11+
branches:
12+
- released
13+
pull_request_review:
14+
types: [submitted]
15+
branches:
16+
- released
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v2
23+
- name: Deploy to server
24+
uses: appleboy/ssh-action@master
25+
with:
26+
host: ${{ secrets.HOST }}
27+
username: ${{ secrets.USERNAME }}
28+
port: ${{ secrets.PORT }}
29+
key: ${{ secrets.SSHKEY }}
30+
script: cd ${{ secrets.SPAPATH }} && bash .scripts/deploy.sh
31+
# jobs:
32+
# approved:
33+
# if: github.event.review.state == 'approved'
34+
# runs-on: ubuntu-latest
35+
# steps:
36+
# - run: echo "This PR was approved"
37+
# - uses: actions/checkout@v2
38+
# - name: Deploy to server
39+
# uses: appleboy/ssh-action@master
40+
# with:
41+
# host: ${{ secrets.HOST }}
42+
# username: ${{ secrets.USERNAME }}
43+
# port: ${{ secrets.PORT }}
44+
# key: ${{ secrets.SSHKEY }}
45+
# script: cd ${{ secrets.SPAPATH }} && bash .scripts/deploy.sh

.github/workflows/gitguardian.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: GitGuardian
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
scanning:
7+
name: GitGuardian scan
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v2
12+
with:
13+
fetch-depth: 0 # fetch all history so multiple commits can be scanned
14+
- name: GitGuardian scan
15+
uses: GitGuardian/ggshield-action@master
16+
env:
17+
GITHUB_PUSH_BEFORE_SHA: ${{ github.event.before }}
18+
GITHUB_PUSH_BASE_SHA: ${{ github.event.base }}
19+
GITHUB_PULL_BASE_SHA: ${{ github.event.pull_request.base.sha }}
20+
GITHUB_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
21+
GITGUARDIAN_API_KEY: ${{ secrets.GITGUARDIAN_API_KEY }}

.github/workflows/greetings.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Greetings
2+
3+
on: [pull_request_target, issues]
4+
5+
jobs:
6+
greeting:
7+
runs-on: ubuntu-latest
8+
permissions:
9+
issues: write
10+
pull-requests: write
11+
steps:
12+
- uses: actions/first-interaction@v1
13+
with:
14+
repo-token: ${{ secrets.GITHUB_TOKEN }}
15+
issue-message: 'Hello, thank you for time. Please make sure the issue is not environment specific. If this is a security issue please email [email protected]'
16+
pr-message: '👋 Thank you for contributing. Your PR will be reviewed and if all is good it will be merged in. Thank you again ❤️'

.github/workflows/labeler.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# This workflow will triage pull requests and apply a label based on the
2+
# paths that are modified in the pull request.
3+
#
4+
# To use this workflow, you will need to set up a .github/labeler.yml
5+
# file with configuration. For more information, see:
6+
# https://github.com/actions/labeler
7+
8+
name: Labeler
9+
on: [pull_request]
10+
11+
jobs:
12+
label:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
pull-requests: write
17+
18+
steps:
19+
- uses: actions/labeler@v4
20+
with:
21+
repo-token: '${{ secrets.GITHUB_TOKEN }}'
22+
sync-labels: true

.github/workflows/laravel.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Laravel
2+
3+
on:
4+
push:
5+
branches: ['master']
6+
pull_request:
7+
branches: ['master']
8+
9+
jobs:
10+
laravel-tests:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
15+
with:
16+
php-version: '8.0'
17+
- uses: actions/checkout@v3
18+
- name: Copy .env
19+
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
20+
- name: Install Dependencies
21+
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
22+
- name: Generate key
23+
run: php artisan key:generate
24+
- name: Directory Permissions
25+
run: chmod -R 777 storage bootstrap/cache

.github/workflows/node.js.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: Node.js CI
5+
6+
on:
7+
push:
8+
branches: ['master']
9+
pull_request:
10+
branches: ['master']
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
strategy:
17+
matrix:
18+
node-version: [16.x, 18.x]
19+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
20+
21+
steps:
22+
- uses: actions/checkout@v3
23+
- name: Use Node.js ${{ matrix.node-version }}
24+
uses: actions/setup-node@v3
25+
with:
26+
node-version: ${{ matrix.node-version }}
27+
- run: npm install
28+
- run: npm run lint
29+
- run: npm run clean

0 commit comments

Comments
 (0)