Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): address codeql issues in gha workflows #128

Merged
merged 1 commit into from
Jan 27, 2025
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
4 changes: 4 additions & 0 deletions .github/workflows/check-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]

permissions:
contents: read
pull-requests: write
kmruiz marked this conversation as resolved.
Show resolved Hide resolved

jobs:
changelog:
runs-on: ubuntu-latest
Expand Down
26 changes: 19 additions & 7 deletions .github/workflows/check-pr-title.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,36 @@
name: "Check PR Title"
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled, converted_to_draft, edited]
types:
- opened
- synchronize
- reopened
- ready_for_review
- labeled
- unlabeled
- converted_to_draft
- edited

permissions:
contents: read
pull-requests: read
kmruiz marked this conversation as resolved.
Show resolved Hide resolved

jobs:
check-pr-title:
name: Check PR Title
runs-on: ubuntu-latest
steps:
- name: Enforce conventional commit style
uses: realm/ci-actions/title-checker@main
uses: realm/ci-actions/title-checker@d6cc8f067474759d38e6d24e272027b4c88bc0a9
with:
regex: '^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test|ops){1}(\([\w\-\.]+\))?(!)?: .*'
error-hint: 'Invalid PR title. Make sure it follows the conventional commit specification (i.e. "<type>(<optional scope>): <description>") or add the no-title-validation label'
ignore-labels: 'no-title-validation'
ignore-labels: no-title-validation
- name: Enforce JIRA ticket in title
uses: realm/ci-actions/title-checker@main
uses: realm/ci-actions/title-checker@d6cc8f067474759d38e6d24e272027b4c88bc0a9
# Skip the JIRA ticket check for PRs opened by bots
if: ${{ !contains(github.event.pull_request.user.login, '[bot]') }}
with:
regex: '[A-Z]{4,10}-[0-9]{1,5}$'
error-hint: 'Invalid PR title. Make sure it ends with a JIRA ticket - i.e. VSCODE-1234 or add the no-title-validation label'
ignore-labels: 'no-title-validation'
regex: "[A-Z]{4,10}-[0-9]{1,5}$"
error-hint: Invalid PR title. Make sure it ends with a JIRA ticket - i.e. VSCODE-1234 or add the no-title-validation label
ignore-labels: no-title-validation
3 changes: 3 additions & 0 deletions .github/workflows/publish-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
release:
types: [published]

permissions:
contents: read

jobs:
prepare-release:
name: "Prepare Release"
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/quality-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
java-version: "17"

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 # 4.2.2
with:
dependency-graph: "generate-and-submit"
dependency-graph-continue-on-failure: false
Expand All @@ -51,7 +51,7 @@ jobs:
java-version: "17"

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 # 4.2.2
with:
gradle-home-cache-cleanup: true

Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
java-version: "17"

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 # 4.2.2
with:
gradle-home-cache-cleanup: true

Expand All @@ -91,7 +91,7 @@ jobs:
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

echo "Adding the repository to APT sources"
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
Expand All @@ -102,7 +102,6 @@ jobs:
echo "Installing docker"
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin


- name: Run Test Suite
run: |
./gradlew --stacktrace --console=plain check
Expand Down Expand Up @@ -144,7 +143,7 @@ jobs:
# java-version: "17"
#
# - name: Setup Gradle
# uses: gradle/actions/setup-gradle@v4
# uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 # 4.2.2
# with:
# gradle-home-cache-cleanup: true
#
Expand Down Expand Up @@ -227,7 +226,7 @@ jobs:
java-version: "17"

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 # 4.2.2
with:
gradle-home-cache-cleanup: true

Expand Down Expand Up @@ -262,7 +261,7 @@ jobs:
java-version: "17"

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 # 4.2.2
with:
gradle-home-cache-cleanup: true

Expand Down
Loading