Repository navigation
Focal: build PG14/15/16 for 12.1.x #2179
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Package | |
| env: | |
| MAIN_BRANCH: "all-citus" | |
| PACKAGE_CLOUD_REPO_NAME: "citusdata/community" | |
| PACKAGE_CLOUD_API_TOKEN: ${{ secrets.PACKAGE_CLOUD_API_TOKEN }} | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
| PACKAGING_SECRET_KEY: ${{ secrets.PACKAGING_SECRET_KEY }} | |
| PACKAGING_PASSPHRASE: ${{ secrets.PACKAGING_PASSPHRASE }} | |
| on: | |
| push: | |
| branches: | |
| - "**" | |
| workflow_dispatch: | |
| jobs: | |
| build_package: | |
| name: Build package | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: | |
| - el/8 | |
| - el/9 | |
| - ol/8 | |
| - ol/9 | |
| - debian/bullseye | |
| - debian/bookworm | |
| - debian/trixie | |
| - ubuntu/noble | |
| - ubuntu/jammy | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - uses: actions/create-github-app-token@v3 | |
| id: app-token | |
| with: | |
| app-id: ${{ vars.GH_APP_ID }} | |
| private-key: ${{ secrets.GH_APP_KEY }} | |
| owner: citusdata | |
| - name: Export app token to environment | |
| run: | | |
| echo "GH_TOKEN=${{ steps.app-token.outputs.token }}" >> $GITHUB_ENV | |
| echo "GITHUB_TOKEN=${{ steps.app-token.outputs.token }}" >> $GITHUB_ENV | |
| - name: Clone tools branch | |
| run: git clone -b v0.8.36 --depth=1 https://github.com/citusdata/tools.git tools | |
| - name: Install package dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libcurl4-openssl-dev libssl-dev python3-testresources | |
| - name: Install python requirements | |
| run: python -m pip install -r tools/packaging_automation/requirements.txt | |
| - name: Build packages | |
| run: | | |
| python -m tools.packaging_automation.citus_package \ | |
| --gh_token "${GH_TOKEN}" \ | |
| --platform "${{ matrix.platform }}" \ | |
| --build_type "release" \ | |
| --secret_key "${PACKAGING_SECRET_KEY}" \ | |
| --passphrase "${PACKAGING_PASSPHRASE}" \ | |
| --output_dir "$(pwd)/packages/" \ | |
| --input_files_dir "$(pwd)" \ | |
| --output_validation | |
| - name: Publish packages | |
| run: | | |
| python -m tools.packaging_automation.upload_to_package_cloud \ | |
| --platform "${{ matrix.platform }}" \ | |
| --package_cloud_api_token "${PACKAGE_CLOUD_API_TOKEN}" \ | |
| --repository_name "${PACKAGE_CLOUD_REPO_NAME}" \ | |
| --output_file_path "$(pwd)/packages" \ | |
| --current_branch "${GITHUB_REF##*/}" \ | |
| --main_branch "${MAIN_BRANCH}" | |
| trigger_package_tests: | |
| name: Trigger package tests | |
| needs: build_package | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - uses: actions/create-github-app-token@v3 | |
| id: app-token | |
| with: | |
| app-id: ${{ vars.GH_APP_ID }} | |
| private-key: ${{ secrets.GH_APP_KEY }} | |
| owner: citusdata | |
| - name: Set citus version | |
| id: set_version | |
| run: | | |
| source pkgvars | |
| version=${pkglatest%.citus-1} | |
| echo ::set-output name=version::${version} | |
| - name: Trigger package tests | |
| run: | | |
| gh workflow run "citus-package-tests" \ | |
| --repo citusdata/tools \ | |
| -f project_version="${{ steps.set_version.outputs.version }}" | |
| env: | |
| GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} |