Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "CodeQL"

on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: 0 0 * * 1
workflow_dispatch: # allow on-demand manual scans

permissions: # least privilege
contents: read

jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
permissions:
security-events: write # required to upload CodeQL results
contents: read
strategy:
fail-fast: false
matrix:
language: ["actions", "python"]

steps:
- uses: actions/checkout@v7

- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: "/language:${{ matrix.language }}"
3 changes: 3 additions & 0 deletions .github/workflows/pypiupload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
types: [created]
workflow_dispatch: # Allow manual trigger for testing

permissions: # least privilege; the deploy job overrides this for OIDC
contents: read

jobs:
deploy:
runs-on: ubuntu-latest
Expand Down
26 changes: 18 additions & 8 deletions .github/workflows/spec_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,35 @@ jobs:
git submodule update --remote --recursive
- name: Generate Branch Name
id: git-branch
env:
FORMATTED_TIME: ${{ steps.current-time.outputs.formattedTime }}
run: |
echo "::set-output name=branch::spec_update_${{ steps.current-time.outputs.formattedTime }}"
echo "branch=spec_update_${FORMATTED_TIME}" >> "$GITHUB_OUTPUT"
- name: Generate Num Diffs
id: git-diff-num
run: |
diffs=$(git diff --submodule spec | grep ">" | wc -l)
echo "Number of Spec diffs: $diffs"
echo "::set-output name=num-diff::$diffs"
echo "num-diff=$diffs" >> "$GITHUB_OUTPUT"
- name: Generate Diff
id: git-diff
env:
NUM_DIFF: ${{ steps.git-diff-num.outputs.num-diff }}
run: |
cd spec
gitdiff=$(git log -n ${{ steps.git-diff-num.outputs.num-diff }} --pretty="format:%n %H %n%n %b")
gitdiff=$(git log -n "$NUM_DIFF" --pretty="format:%n %H %n%n %b")
commit="Automated Spec Update $gitdiff"
commit="${commit//'%'/'%25'}"
commit="${commit//$'\n'/'%0A'}"
commit="${commit//$'\r'/'%0D'}"
echo "Commit Message: $commit"
echo "::set-output name=commit::$commit"
while true; do
delimiter="SPEC_UPDATE_EOF_$(python -c 'import uuid; print(uuid.uuid4())')"
if ! grep -Fxq "$delimiter" <<< "$commit"; then
break
fi
done
{
printf 'commit<<%s\n' "$delimiter"
printf '%s\n' "$commit"
printf '%s\n' "$delimiter"
} >> "$GITHUB_OUTPUT"
cd ..
- name: Generate New Routes
run: |
Expand Down
Loading