From cd3def125d5d58b6002bb735f9dcdd06d9141fcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20No=C3=ABl?= Date: Mon, 9 Sep 2024 16:40:34 -0700 Subject: [PATCH] Rm unnecessary files --- .github/workflows/lint-format.yml | 64 ----------------- .github/workflows/lint-pr-title.yml | 29 -------- .github/workflows/publish-chart.yml | 105 ---------------------------- 3 files changed, 198 deletions(-) delete mode 100644 .github/workflows/lint-format.yml delete mode 100644 .github/workflows/lint-pr-title.yml delete mode 100644 .github/workflows/publish-chart.yml diff --git a/.github/workflows/lint-format.yml b/.github/workflows/lint-format.yml deleted file mode 100644 index f99fe8026..000000000 --- a/.github/workflows/lint-format.yml +++ /dev/null @@ -1,64 +0,0 @@ -# workflows/lint-format.yml -# -# Lint Format -# Lint the project's file trailing spaces, line endings, and format. - -name: Lint Format - -on: - pull_request: - types: [opened, synchronize, reopened, ready_for_review] - workflow_dispatch: - -concurrency: - group: lint-format-${{ github.head_ref || github.ref }} - cancel-in-progress: true - -jobs: - lint-format: - name: Lint File Endings & Trailing Whitespaces - runs-on: ubuntu-latest - if: github.event.pull_request.draft == false - - steps: - - name: Checkout Git Repository - uses: actions/checkout@v4 - - - name: Install fd Search Tool - run: | - sudo apt-get update - sudo apt-get install -y fd-find - mkdir -p "$HOME/.local/bin" - sudo ln -s $(which fdfind) "$HOME/.local/bin/fd" - echo "$HOME/.local/bin" >> $GITHUB_PATH - - - name: Add Trailing Newlines - run: .github/workflows/helpers/lint_trailing_newlines.sh - - - name: Check for CRLF Files - run: | - FILES=$(git ls-files --eol | grep crlf || true) - if [[ ! -z "$FILES" ]]; then - echo "The following files have incorrect line endings:" - echo "$FILES" - false - fi - - - name: Check for Trailing Whitespaces - run: | - FILES=$(git grep -Ilr '[[:blank:]]$' || true) - if [[ ! -z "$FILES" ]]; then - echo "The following files have trailing whitespaces:" - echo "$FILES" - exit 1 - fi - - - name: Print Modified Files - run: | - FILES=$(git ls-files --modified) - if [[ ! -z "$FILES" ]]; then - echo "The following files have incorrect trailing newlines:" - echo "$FILES" - echo "Please fix them using .github/workflows/helpers/lint_trailing_newlines.sh" - false - fi diff --git a/.github/workflows/lint-pr-title.yml b/.github/workflows/lint-pr-title.yml deleted file mode 100644 index b34bab229..000000000 --- a/.github/workflows/lint-pr-title.yml +++ /dev/null @@ -1,29 +0,0 @@ -# workflows/lint-pr-title.yml -# -# Lint PR Title -# Lint and enforce proper PR title format. - -name: Lint PR Title - -on: - pull_request: - types: [opened, synchronize, reopened, ready_for_review] - -permissions: - pull-requests: read - -concurrency: - group: lint-pr-title-${{ github.head_ref || github.ref }} - cancel-in-progress: true - -jobs: - lint-pr-title: - name: Validate PR Title - runs-on: ubuntu-latest - if: github.event.pull_request.draft == false - - steps: - - name: Checkout Git Repository - uses: amannn/action-semantic-pull-request@v5 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/publish-chart.yml b/.github/workflows/publish-chart.yml deleted file mode 100644 index 464039739..000000000 --- a/.github/workflows/publish-chart.yml +++ /dev/null @@ -1,105 +0,0 @@ -# workflows/publish-helm-chart.yml -# -# Publish Helm Chart -# Publish Helm Chart to paradedb.github.io via GitHub Pages. This workflow also triggers -# the creation of a GitHub Release and only happens once we trigger a workflow_dispatch -# event, either manually or via creating a release in the `paradedb/paradedb` repository. - -name: Publish Helm Chart - -on: - push: - branches: - - main - workflow_dispatch: - inputs: - appVersion: - description: "The ParadeDB version to publish in the Helm Chart (e.g. 0.1.0)" - required: true - default: "" - -concurrency: - group: publish-helm-chart-${{ github.head_ref || github.ref }} - cancel-in-progress: true - -jobs: - release: - name: Publish ParadeDB Helm Chart to GitHub Pages - runs-on: ubuntu-latest - permissions: - contents: write - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Configure Git - run: | - git config user.name "$GITHUB_ACTOR" - git config user.email "$GITHUB_ACTOR@users.noreply.github.com" - - - name: Set Helm Chart Release Versions - id: set_versions - working-directory: charts/paradedb/ - env: - GH_TOKEN: ${{ secrets.GHA_CREATE_RELEASE_PAT }} - run: | - # Increment the Helm Chart version patch number by one - NEW_CHART_VERSION_PATCH=$(( ${{ vars.CHART_VERSION_PATCH }} + 1 )) - - # If no appVersion is provided, we use the latest ParadeDB version - if [ -z "${{ github.event.inputs.appVersion }}" ]; then - LATEST_TAG=$(curl -s https://api.github.com/repos/paradedb/paradedb/tags | jq -r '.[0].name') - APP_VERSION=${LATEST_TAG#v} - else - APP_VERSION=${{ github.event.inputs.appVersion }} - fi - # Update appVersion to the GitHub Release version and version to the Helm Chart version - sed -i "s/^appVersion: .*/appVersion: $APP_VERSION/" Chart.yaml - sed -i "s/^version: .*/version: ${{ vars.CHART_VERSION_MAJOR }}.${{ vars.CHART_VERSION_MINOR }}.${NEW_CHART_VERSION_PATCH}/" Chart.yaml - cat Chart.yaml - - # Set output to update post-release - echo "new_chart_version_patch=${NEW_CHART_VERSION_PATCH}" >> $GITHUB_OUTPUT - - # The README needs to be in the same directory as the Chart.yaml file for ArtifactHub to display it - - name: Copy README.md for Packaging - run: cp README.md charts/paradedb/README.md - - # The GitHub repository secret `PARADEDB_PGP_PRIVATE_KEY` contains the private key - # in ASCII-armored format. To export a (new) key, run this command: - # `gpg --armor --export-secret-key ` - - name: Prepare ParadeDB PGP Key - env: - PGP_PRIVATE_KEY: "${{ secrets.PARADEDB_PGP_PRIVATE_KEY }}" - PGP_PASSPHRASE: "${{ secrets.PARADEDB_PGP_PASSPHRASE }}" - run: | - IFS="" - echo "$PGP_PRIVATE_KEY" | gpg --dearmor --verbose > $HOME/secring.gpg - echo "$PGP_PASSPHRASE" > $HOME/passphrase.txt - - # Tell chart-releaser-action where to find the key and its passphrase - echo "CR_KEYRING=$HOME/secring.gpg" >> "$GITHUB_ENV" - echo "CR_PASSPHRASE_FILE=$HOME/passphrase.txt" >> "$GITHUB_ENV" - - - name: Run chart-releaser - uses: helm/chart-releaser-action@v1.6.0 - with: - config: "./.github/config/cr.yaml" - env: - CR_TOKEN: "${{ secrets.GHA_CREATE_RELEASE_PAT }}" - - # We have a separate version for our Helm Chart, since it needs to always increment by - # one for every production release, independently of the ParadeDB version. Any non-patch - # version increment should be done manually in GitHub Actions Variables. - - name: Increment Helm Chart Version Number in GitHub Actions Variables - env: - GH_TOKEN: ${{ secrets.GHA_CREATE_RELEASE_PAT }} - run: | - gh api \ - --method PATCH \ - -H "Accept: application/vnd.github+json" \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - /repos/paradedb/helm-charts/actions/variables/CHART_VERSION_PATCH \ - -f name='CHART_VERSION_PATCH' \ - -f value='${{ steps.set_versions.outputs.new_chart_version_patch }}'