Files
Shuai Tian 155eb41bfe Merged PR 1741151: [oss] Improve workflow of packaging and fix signing tool
### Does this PR have any customer impact?

### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)

### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)

### Are you introducing any new config? If yes, do you have tests with and without them being set?

### ChangeLog (Refer [Template](../oss/CHANGELOG.md))

### Description

----
#### AI description  (iteration 1)
#### PR Classification
This pull request improves the packaging workflow by updating and fixing the signing tool integration for both DEB and RPM packages.

#### PR Summary
The changes streamline the build and signing processes in the OSS workflows, ensuring more consistent and simplified key generation and package verification.
- `oss/.github/workflows/build_packages.yml`: Updates the DEB package signing by removing branch-specific conditions, switching to a quick GPG key generation method, revising the dpkg-sig installation process, updating the cosign verify regex to support branches and tags, and reducing the OS matrix to ubuntu22.04.
- `oss/.github/workflows/build_rpm_packages.yml`: Refines RPM package signing by eliminating branch checks, replacing the batch key generation with a quick-gen-key command, and modifying the RPM signing macros for a cleaner signing command.
<!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
2025-07-28 13:14:05 +08:00

73 lines
2.2 KiB
YAML

name: "CodeQL"
on:
schedule:
- cron: '59 23 * * 6'
workflow_dispatch:
jobs:
analyze:
name: Analyze
runs-on: ubuntu-22.04
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'c-cpp', 'python' ]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
- name: Install package dependencies
run: |
# Create the file repository configuration:
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main 16" > /etc/apt/sources.list.d/pgdg.list'
# Import the repository signing key:
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
wget \
curl \
sudo \
gnupg2 \
lsb-release \
tzdata \
build-essential \
pkg-config \
cmake \
git \
postgresql-16 \
postgresql-server-dev-16 \
libpq-dev \
libicu-dev \
libkrb5-dev \
postgresql-16-cron \
postgresql-16-pgvector \
postgresql-16-postgis-3 \
postgresql-16-rum
export CLEAN_SETUP=1
export INSTALL_DEPENDENCIES_ROOT=/tmp/install_setup
mkdir -p /tmp/install_setup
cp ./scripts/* /tmp/install_setup
sudo INSTALL_DEPENDENCIES_ROOT=$INSTALL_DEPENDENCIES_ROOT MAKE_PROGRAM=cmake /tmp/install_setup/install_setup_libbson.sh
sudo INSTALL_DEPENDENCIES_ROOT=$INSTALL_DEPENDENCIES_ROOT /tmp/install_setup/install_setup_pcre2.sh
sudo INSTALL_DEPENDENCIES_ROOT=$INSTALL_DEPENDENCIES_ROOT /tmp/install_setup/install_setup_intel_decimal_math_lib.sh
sudo INSTALL_DEPENDENCIES_ROOT=$INSTALL_DEPENDENCIES_ROOT /tmp/install_setup/install_citus_indent.sh
- name: Configure, Build and Install DocumentDB
run: |
make
sudo make install
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3