Skip to content

Commit e512562

Browse files
authored
Merge pull request #242 from devmount/chores/update-workflows
Update workflow actions
2 parents 24112f2 + 4b710d4 commit e512562

3 files changed

Lines changed: 81 additions & 32 deletions

File tree

Lines changed: 65 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,88 @@
11
# CodeQL Analysis
2-
name: "CodeQL"
2+
name: "CodeQL Advanced"
33

44
on:
55
push:
6-
branches: [main]
6+
branches: [ "main" ]
77
pull_request:
8-
# The branches below must be a subset of the branches above
9-
branches: [main]
10-
schedule:
11-
- cron: '30 1 * * 0'
8+
branches: [ "main" ]
129

1310
jobs:
1411
analyze:
15-
name: Analyze
16-
runs-on: ubuntu-latest
12+
name: Analyze (${{ matrix.language }})
13+
# Runner size impacts CodeQL analysis time. To learn more, please see:
14+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
15+
# - https://gh.io/supported-runners-and-hardware-resources
16+
# - https://gh.io/using-larger-runners (GitHub.com only)
17+
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
18+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
19+
permissions:
20+
# required for all workflows
21+
security-events: write
22+
23+
# required to fetch internal or private CodeQL packs
24+
packages: read
25+
26+
# only required for workflows in private repositories
27+
actions: read
28+
contents: read
1729

1830
strategy:
1931
fail-fast: false
2032
matrix:
21-
# Override automatic language detection by changing the below list
22-
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
23-
language: ['javascript']
24-
33+
include:
34+
- language: actions
35+
build-mode: none
36+
- language: javascript-typescript
37+
build-mode: none
38+
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
39+
# Use `c-cpp` to analyze code written in C, C++ or both
40+
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
41+
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
42+
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
43+
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
44+
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
45+
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
2546
steps:
2647
- name: Checkout repository
27-
uses: actions/checkout@v2
48+
uses: actions/checkout@v4
49+
50+
# Add any setup steps before running the `github/codeql-action/init` action.
51+
# This includes steps like installing compilers or runtimes (`actions/setup-node`
52+
# or others). This is typically only required for manual builds.
53+
# - name: Setup runtime (example)
54+
# uses: actions/setup-example@v1
2855

2956
# Initializes the CodeQL tools for scanning.
3057
- name: Initialize CodeQL
31-
uses: github/codeql-action/init@v1
58+
uses: github/codeql-action/init@v3
3259
with:
3360
languages: ${{ matrix.language }}
61+
build-mode: ${{ matrix.build-mode }}
62+
# If you wish to specify custom queries, you can do so here or in a config file.
63+
# By default, queries listed here will override any specified in a config file.
64+
# Prefix the list here with "+" to use these queries and those in the config file.
3465

35-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
36-
# If this step fails, then you should remove it and run the build manually (see below)
37-
- name: Autobuild
38-
uses: github/codeql-action/autobuild@v1
66+
# For more 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
67+
# queries: security-extended,security-and-quality
3968

69+
# If the analyze step fails for one of the languages you are analyzing with
70+
# "We were unable to automatically build your code", modify the matrix above
71+
# to set the build mode to "manual" for that language. Then modify this step
72+
# to build your code.
4073
# ℹ️ Command-line programs to run using the OS shell.
41-
# 📚 https://git.io/JvXDl
74+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
75+
- if: matrix.build-mode == 'manual'
76+
shell: bash
77+
run: |
78+
echo 'If you are using a "manual" build mode for one or more of the' \
79+
'languages you are analyzing, replace this with the commands to build' \
80+
'your code, for example:'
81+
echo ' make bootstrap'
82+
echo ' make release'
83+
exit 1
84+
4285
- name: Perform CodeQL Analysis
43-
uses: github/codeql-action/analyze@v1
86+
uses: github/codeql-action/analyze@v3
87+
with:
88+
category: "/language:${{matrix.language}}"

.github/workflows/deploy-dev.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,26 @@ name: Build & Deploy (Nightly)
77
on:
88
push:
99
branches: [ main ]
10+
# Allows to run this workflow manually from the Actions tab
11+
workflow_dispatch:
1012

1113
jobs:
1214
build:
1315
runs-on: ubuntu-latest
1416
steps:
15-
- uses: actions/checkout@v2
16-
- name: Use Node.js 20
17-
uses: actions/setup-node@v1
17+
- uses: actions/checkout@v4
18+
- name: Use Node.js
19+
uses: actions/setup-node@v4
1820
with:
19-
node-version: 20.x
20-
- name: Build app via NPM
21+
node-version: '22.x'
22+
- name: Build app
2123
run: |
2224
cd frontend/
2325
printf "VITE_FB_API_KEY=${{ secrets.VUE_APP_FB_API_KEY_DEV }}\nVITE_FB_PROJECT_ID=${{ secrets.VUE_APP_FB_PROJECT_ID_DEV }}" >> .env.production.local
2426
npm install
2527
npm run build
2628
- name: Push Build files to testing environment
27-
uses: burnett01/rsync-deployments@5.2
29+
uses: burnett01/rsync-deployments@7.0.2
2830
with:
2931
switches: -avzr --delete
3032
path: frontend/dist/

.github/workflows/deploy-prod.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,26 @@ on:
88
push:
99
tags:
1010
- '*'
11+
# Allows to run this workflow manually from the Actions tab
12+
workflow_dispatch:
1113

1214
jobs:
1315
build:
1416
runs-on: ubuntu-latest
1517
steps:
16-
- uses: actions/checkout@v2
17-
- name: Use Node.js 20
18-
uses: actions/setup-node@v1
18+
- uses: actions/checkout@v4
19+
- name: Use Node.js
20+
uses: actions/setup-node@v4
1921
with:
20-
node-version: 20.x
21-
- name: Build app via NPM
22+
node-version: '22.x'
23+
- name: Build app
2224
run: |
2325
cd frontend/
2426
printf "VITE_FB_API_KEY=${{ secrets.VUE_APP_FB_API_KEY_PROD }}\nVITE_FB_PROJECT_ID=${{ secrets.VUE_APP_FB_PROJECT_ID_PROD }}" >> .env.production.local
2527
npm install
2628
npm run build
2729
- name: Push Build files to production environment
28-
uses: burnett01/rsync-deployments@5.2
30+
uses: burnett01/rsync-deployments@7.0.2
2931
with:
3032
switches: -avzr --delete
3133
path: frontend/dist/

0 commit comments

Comments
 (0)