testing with updated tools branch #2339
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 and publish citus community nightly packages | |
| env: | |
| MAIN_BRANCH: "all-citus" | |
| PACKAGE_CLOUD_REPO_NAME: "citusdata/community-nightlies" | |
| PACKAGE_CLOUD_API_TOKEN: ${{ secrets.PACKAGE_CLOUD_API_TOKEN }} | |
| PACKAGING_PASSPHRASE: ${{ secrets.PACKAGING_PASSPHRASE }} | |
| PACKAGING_SECRET_KEY: ${{ secrets.PACKAGING_SECRET_KEY }} | |
| DOCKERHUB_USER_NAME: ${{ secrets.DOCKERHUB_USER_NAME }} | |
| DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} | |
| on: | |
| push: | |
| branches: | |
| - "**" | |
| schedule: | |
| - cron: "30 1 * * *" | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build_package: | |
| name: Build package | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: | |
| - el/8 | |
| - debian/bullseye | |
| - debian/bookworm | |
| - debian/trixie | |
| - ubuntu/jammy | |
| - ubuntu/noble | |
| steps: | |
| - name: Create GitHub App token | |
| id: app | |
| uses: actions/create-github-app-token@v1 | |
| with: | |
| app-id: ${{ vars.GH_APP_ID }} | |
| private-key: ${{ secrets.GH_APP_KEY }} | |
| owner: ${{ github.repository_owner }} | |
| - name: Set GH_TOKEN for all steps | |
| run: echo "GH_TOKEN=${{ steps.app.outputs.token }}" >> $GITHUB_ENV | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| token: ${{ steps.app.outputs.token }} | |
| - name: Configure git with x-access-token | |
| run: git config --global url."https://x-access-token:${{ steps.app.outputs.token }}@github.com/".insteadOf "https://github.com/" | |
| # This step is to fetch the images unanonymously to have higher bandwidth | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v2 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USER_NAME }} | |
| password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
| - name: Clone tools repo for test | |
| run: git clone -b brk-test --depth=1 https://github.com/citusdata/tools.git tools | |
| - name: Clone build branch | |
| run: git clone -b "${MAIN_BRANCH}" --depth=1 https://github.com/citusdata/packaging.git packaging | |
| - name: Install package dependencies | |
| run: sudo apt-get update && sudo apt-get install 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 "nightly" \ | |
| --secret_key "${PACKAGING_SECRET_KEY}" \ | |
| --passphrase "${PACKAGING_PASSPHRASE}" \ | |
| --output_dir "$(pwd)/packages/" \ | |
| --input_files_dir "$(pwd)/packaging" \ | |
| --is_test | |
| - 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 "develop" |