Skip to content

Commit 6a96579

Browse files
authored
Merge branch 'github:main-enterprise' into main-enterprise
2 parents bb1b033 + c718e9a commit 6a96579

42 files changed

Lines changed: 3929 additions & 3494 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devcontainer/Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.195.0/containers/javascript-node/.devcontainer/base.Dockerfile
2-
# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 16, 14, 12, 16-bullseye, 14-bullseye, 12-bullseye, 16-buster, 14-buster, 12-buster
3-
ARG VARIANT=20-bookworm
2+
# [Choice] Node.js version/variant (use -bookworm variants on local arm64/Apple Silicon): e.g. 22-bookworm, 20-bookworm, 18-bookworm
3+
ARG VARIANT=22-bookworm
44
FROM mcr.microsoft.com/devcontainers/javascript-node:1-${VARIANT}
55

66
# [Optional] Uncomment this section to install additional OS packages.
@@ -23,7 +23,10 @@ RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m).zip" -o "aws
2323
rm -rf ./aws && \
2424
rm awscliv2.zip
2525
# Install sam cli
26-
RUN curl -L "https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-$(dpkg --print-architecture).zip" -o "aws-sam-cli.zip" && \
26+
RUN ARCH_RAW=$(uname -m) && \
27+
ARCH=$ARCH_RAW && \
28+
if [ "$ARCH_RAW" = "aarch64" ]; then ARCH="arm64"; fi && \
29+
curl -L "https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-${ARCH}.zip" -o "aws-sam-cli.zip" && \
2730
unzip aws-sam-cli.zip -d sam-installation && \
2831
sudo ./sam-installation/install && \
2932
rm -rf ./sam-installation && \

.devcontainer/devcontainer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
"name": "Node.js",
55
"build": {
66
"dockerfile": "Dockerfile",
7-
// Update 'VARIANT' to pick a Node version: 16, 14, 12.
8-
// Append -bullseye or -buster to pin to an OS version.
9-
// Use -bullseye variants on local arm64/Apple Silicon.
10-
"args": { "VARIANT": "20-bookworm" }
7+
// Update 'VARIANT' to pick a Node version, e.g. 22, 20, 18.
8+
// Append -bookworm or -bullseye to pin to an OS version.
9+
// Use -bookworm variants on local arm64/Apple Silicon.
10+
"args": { "VARIANT": "22-bookworm" }
1111
},
1212

1313
"settings": {},
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
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 Advanced"
13+
14+
on:
15+
workflow_dispatch:
16+
push:
17+
branches: [ "main-enterprise" ]
18+
pull_request:
19+
branches: [ "main-enterprise" ]
20+
21+
22+
jobs:
23+
analyze:
24+
name: Analyze (${{ matrix.language }})
25+
# Runner size impacts CodeQL analysis time. To learn more, please see:
26+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
27+
# - https://gh.io/supported-runners-and-hardware-resources
28+
# - https://gh.io/using-larger-runners (GitHub.com only)
29+
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
30+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
31+
permissions:
32+
# required for all workflows
33+
security-events: write
34+
35+
# required to fetch internal or private CodeQL packs
36+
packages: read
37+
38+
# only required for workflows in private repositories
39+
actions: read
40+
contents: read
41+
42+
strategy:
43+
fail-fast: false
44+
matrix:
45+
include:
46+
- language: actions
47+
build-mode: none
48+
- language: javascript-typescript
49+
build-mode: none
50+
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift'
51+
# Use `c-cpp` to analyze code written in C, C++ or both
52+
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
53+
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
54+
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
55+
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
56+
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
57+
# 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
58+
steps:
59+
- name: 'Checkout repository'
60+
uses: actions/checkout@v4
61+
# Initializes the CodeQL tools for scanning.
62+
- name: Initialize CodeQL
63+
uses: github/codeql-action/init@v4
64+
with:
65+
languages: ${{ matrix.language }}
66+
build-mode: ${{ matrix.build-mode }}
67+
68+
69+
- name: Perform CodeQL Analysis
70+
uses: github/codeql-action/analyze@v4
71+
with:
72+
category: "/language:${{matrix.language}}"

.github/workflows/create-pre-release.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
- name: Setup node
4747
uses: actions/setup-node@v6
4848
with:
49-
node-version: 16.x
49+
node-version: 22.x
5050
cache: 'npm'
5151
- run: npm install
5252
- name: Set up Docker Buildx
@@ -71,9 +71,10 @@ jobs:
7171
- name: Run Functional Tests
7272
id: functionaltest
7373
run: |
74-
docker run --env APP_ID=${{ secrets.APP_ID }} --env PRIVATE_KEY=${{ secrets.PRIVATE_KEY }} --env WEBHOOK_SECRET=${{ secrets.WEBHOOK_SECRET }} -d -p 3000:3000 ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:main-enterprise
74+
CONTAINER_ID=$(docker run --env APP_ID=${{ secrets.APP_ID }} --env PRIVATE_KEY=${{ secrets.PRIVATE_KEY }} --env WEBHOOK_SECRET=${{ secrets.WEBHOOK_SECRET }} --env NODE_ENV=development -d -p 3000:3000 ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:main-enterprise)
7575
sleep 10
76-
curl http://localhost:3000
76+
docker logs $CONTAINER_ID || true
77+
curl --fail --retry 5 --retry-delay 3 --retry-connrefused http://localhost:3000
7778
- run: echo "${{ github.ref }}"
7879
- name: Tag a final release
7980
id: prerelease

.github/workflows/create-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Setup node
2525
uses: actions/setup-node@v6
2626
with:
27-
node-version: 16.x
27+
node-version: 22.x
2828
cache: "npm"
2929
- run: npm install
3030
- name: Set up Docker Buildx

.github/workflows/node-ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ concurrency:
1111

1212
jobs:
1313
test:
14-
if: ${{ github.actor != 'dependabot'}}
14+
if: ${{ github.actor != 'dependabot[bot]'}}
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v6
@@ -25,5 +25,5 @@ jobs:
2525
strategy:
2626
matrix:
2727
node-version:
28-
- 18
29-
- 20
28+
- 22
29+
- 24

.github/workflows/rc-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Use Node.js
2828
uses: actions/setup-node@v6
2929
with:
30-
node-version: 16.x
30+
node-version: 22.x
3131
cache: npm
3232
- run: npm ci
3333
- run: npm run build --if-present

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v20
1+
v22

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
FROM node:20-alpine
1+
FROM node:22-alpine
22
WORKDIR /opt/safe-settings
33
ENV NODE_ENV production
4+
ENV HOST=0.0.0.0
45
## Set the Labels
56
LABEL version="1.0" \
67
description="Probot app which is a modified version of Settings Probot GitHub App" \

docs/deploy.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ This will start the container in the background and detached.
8888
- `docker exec -it safe-settings /bin/sh`
8989
- You will now be inside the running **Docker** container and can perform any troubleshooting needed
9090

91+
### Troubleshooting Docker Build and Runtime Issues
92+
For detailed guidance on debugging Docker image builds, runtime failures, and comparing local vs. GHCR images, see [docker-debugging.md](docker-debugging.md).
93+
9194
## Deploy the app to AWS Lambda
9295

9396
### Production-Ready Template

0 commit comments

Comments
 (0)