From 2ab6df46bb27d33597a737849ae471558ac47202 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Arroyo=20Torrens?= Date: Thu, 28 Nov 2024 12:31:19 +0100 Subject: [PATCH 1/2] chore: update gh actions versions --- .github/workflows/bigquery-ded.yml | 4 +- .github/workflows/bigquery.yml | 16 ++--- .github/workflows/databricks.yml | 8 +-- .github/workflows/draft-new-release.yml | 82 ------------------------- .github/workflows/postgres.yml | 4 +- .github/workflows/publish-release.yml | 1 - .github/workflows/redshift.yml | 4 +- .github/workflows/snowflake.yml | 4 +- 8 files changed, 20 insertions(+), 103 deletions(-) delete mode 100644 .github/workflows/draft-new-release.yml diff --git a/.github/workflows/bigquery-ded.yml b/.github/workflows/bigquery-ded.yml index a4eb69dd6..a8e0e65e1 100644 --- a/.github/workflows/bigquery-ded.yml +++ b/.github/workflows/bigquery-ded.yml @@ -42,13 +42,13 @@ jobs: with: node-version: ${{ env.NODE_VERSION }} - name: Auth google - uses: google-github-actions/auth@v0 + uses: google-github-actions/auth@v2 with: credentials_json: ${{ secrets.BQCARTOCD_DEPLOY_CLOUD_EXTENSIONS_SA_BASE64 }} project_id: ${{ env.BQ_PROJECT }} create_credentials_file: true - name: Setup gcloud - uses: google-github-actions/setup-gcloud@v0 + uses: google-github-actions/setup-gcloud@v2 with: version: ${{ env.GCLOUD_VERSION }} project_id: ${{ env.BQ_PROJECT }} diff --git a/.github/workflows/bigquery.yml b/.github/workflows/bigquery.yml index 117dc49e2..6dc8bcedc 100644 --- a/.github/workflows/bigquery.yml +++ b/.github/workflows/bigquery.yml @@ -40,13 +40,13 @@ jobs: with: node-version: ${{ env.NODE_VERSION }} - name: Auth google - uses: google-github-actions/auth@v0 + uses: google-github-actions/auth@v2 with: credentials_json: ${{ secrets.BQCARTOCI_DEPLOY_CLOUD_EXTENSIONS_SA_BASE64 }} project_id: ${{ env.BQ_PROJECT_CI }} create_credentials_file: true - name: Setup gcloud - uses: google-github-actions/setup-gcloud@v0 + uses: google-github-actions/setup-gcloud@v2 with: version: ${{ env.GCLOUD_VERSION }} project_id: ${{ env.BQ_PROJECT_CI }} @@ -85,13 +85,13 @@ jobs: - name: Check diff uses: technote-space/get-diff-action@v4 - name: Auth google - uses: google-github-actions/auth@v0 + uses: google-github-actions/auth@v2 with: credentials_json: ${{ secrets.BQCARTOCD_DEPLOY_CLOUD_EXTENSIONS_SA_BASE64 }} project_id: ${{ env.BQ_PROJECT }} create_credentials_file: true - name: Setup gcloud - uses: google-github-actions/setup-gcloud@v0 + uses: google-github-actions/setup-gcloud@v2 with: version: ${{ env.GCLOUD_VERSION }} project_id: ${{ env.BQ_PROJECT }} @@ -130,13 +130,13 @@ jobs: - name: Check diff uses: technote-space/get-diff-action@v4 - name: Auth google - uses: google-github-actions/auth@v0 + uses: google-github-actions/auth@v2 with: credentials_json: ${{ secrets.BQCARTO_DEPLOY_CLOUD_EXTENSIONS_SA_BASE64 }} project_id: ${{ matrix.project }} create_credentials_file: true - name: Setup gcloud - uses: google-github-actions/setup-gcloud@v0 + uses: google-github-actions/setup-gcloud@v2 with: version: ${{ env.GCLOUD_VERSION }} project_id: ${{ matrix.project }} @@ -157,13 +157,13 @@ jobs: - name: Checkout repo uses: actions/checkout@v2 - name: Auth google - uses: google-github-actions/auth@v0 + uses: google-github-actions/auth@v2 with: credentials_json: ${{ secrets.GCLOUD_PRODUCTION_RELEASE_SA }} project_id: ${{ secrets.GCLOUD_PRODUCTION_PROJECT }} create_credentials_file: true - name: Setup gcloud - uses: google-github-actions/setup-gcloud@v0 + uses: google-github-actions/setup-gcloud@v2 with: version: ${{ env.GCLOUD_VERSION }} project_id: ${{ secrets.GCLOUD_PRODUCTION_PROJECT }} diff --git a/.github/workflows/databricks.yml b/.github/workflows/databricks.yml index 90bcb5a19..f0aefa854 100644 --- a/.github/workflows/databricks.yml +++ b/.github/workflows/databricks.yml @@ -35,7 +35,7 @@ jobs: - name: Checkout repo uses: actions/checkout@v3 - name: Auth google - uses: google-github-actions/auth@v0 + uses: google-github-actions/auth@v2 with: credentials_json: ${{ secrets.CARTODB_ON_GCP_TERRAFORM_CI_CD_SERVICE_ACCOUNT_KEY }} - name: Get secrets @@ -87,7 +87,7 @@ jobs: - name: Checkout repo uses: actions/checkout@v3 - name: Auth google - uses: google-github-actions/auth@v0 + uses: google-github-actions/auth@v2 with: credentials_json: ${{ secrets.CARTODB_ON_GCP_TERRAFORM_CI_CD_SERVICE_ACCOUNT_KEY }} - name: Get secrets @@ -138,13 +138,13 @@ jobs: - name: Setup virtualenv run: pip install virtualenv==${{ env.VIRTUALENV_VERSION }} - name: Auth google - uses: google-github-actions/auth@v0 + uses: google-github-actions/auth@v2 with: credentials_json: ${{ secrets.GCLOUD_PRODUCTION_RELEASE_SA }} project_id: ${{ secrets.GCLOUD_PRODUCTION_PROJECT }} create_credentials_file: true - name: Setup gcloud - uses: google-github-actions/setup-gcloud@v0 + uses: google-github-actions/setup-gcloud@v2 with: version: ${{ env.GCLOUD_VERSION }} project_id: ${{ secrets.GCLOUD_PRODUCTION_PROJECT }} diff --git a/.github/workflows/draft-new-release.yml b/.github/workflows/draft-new-release.yml deleted file mode 100644 index 71a432201..000000000 --- a/.github/workflows/draft-new-release.yml +++ /dev/null @@ -1,82 +0,0 @@ -name: "Draft new release" - -on: - workflow_dispatch: - inputs: - version: - description: 'The version you want to release in format yyyyy-MM, for example 2022-10' - required: true - -jobs: - draft-new-release: - name: "Draft a new release" - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3 - with: - token: ${{ secrets.CARTOFANTE_GITHUB_TOKEN }} - - name: Check if release tag exists - run: | - if [[ $(git ls-remote --tags origin refs/tags/${{ github.event.inputs.version }}) ]]; then - echo "## Release ${{ github.event.inputs.version }} already exists" - exit 1 - fi - - uses: dorny/paths-filter@v2 - id: changes - with: - filters: | - bigquery: - - 'clouds/bigquery/version' - databricks: - - 'clouds/databricks/version' - postgres: - - 'clouds/postgres/version' - redshift: - - 'clouds/redshift/version' - snowflake: - - 'clouds/snowflake/version' - base: stable - - name: Update bq changelog - if: steps.changes.outputs.bigquery == 'true' - run: | - BQ_VERSION=$(cat clouds/bigquery/version) - sed -i "s/\[Unreleased\]/\[${BQ_VERSION}\] - ${{ github.event.inputs.version }}/g" clouds/bigquery/CHANGELOG.md - - name: Update databricks changelog - if: steps.changes.outputs.databricks == 'true' - run: | - DB_VERSION=$(cat clouds/snowflake/version) - sed -i "s/\[Unreleased\]/\[${DB_VERSION}\] - ${{ github.event.inputs.version }}/g" clouds/databricks/CHANGELOG.md - - name: Update postgres changelog - if: steps.changes.outputs.postgres == 'true' - run: | - PG_VERSION=$(cat clouds/snowflake/version) - sed -i "s/\[Unreleased\]/\[${PG_VERSION}\] - ${{ github.event.inputs.version }}/g" clouds/postgres/CHANGELOG.md - - name: Update redshift changelog - if: steps.changes.outputs.redshift == 'true' - run: | - RS_VERSION=$(cat clouds/snowflake/version) - sed -i "s/\[Unreleased\]/\[${RS_VERSION}\] - ${{ github.event.inputs.version }}/g" clouds/redshift/CHANGELOG.md - - name: Update snowflake changelog - if: steps.changes.outputs.snowflake == 'true' - run: | - SF_VERSION=$(cat clouds/snowflake/version) - sed -i "s/\[Unreleased\]/\[${SF_VERSION}\] - ${{ github.event.inputs.version }}/g" clouds/snowflake/CHANGELOG.md - - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: edit changelog versions - branch: release/${{ github.event.inputs.version }} - create_branch: true - commit_user_name: ${{ secrets.CARTOFANTE_USERNAME }} - commit_user_email: ${{ secrets.CARTOFANTE_EMAIL }} - - name: Create pull request - uses: repo-sync/pull-request@v2 - with: - source_branch: release/${{ github.event.inputs.version }} - destination_branch: stable - pr_title: Release version ${{ github.event.inputs.version }} - pr_reviewer: ${{ github.actor }} # By default, we request a review from the person who triggered the workflow. - pr_body: | - This PR was created in response to a manual trigger of the release workflow here: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}. - Please, check that the version files and changelogs are correct. - This workflow will deploy the DW whose versions have been updated in dedicated environments - Merging this PR will create a GitHub release and publish the AT libraries those DW. diff --git a/.github/workflows/postgres.yml b/.github/workflows/postgres.yml index 8ec6e0a88..7543f9d7f 100644 --- a/.github/workflows/postgres.yml +++ b/.github/workflows/postgres.yml @@ -116,13 +116,13 @@ jobs: - name: Setup virtualenv run: pip install virtualenv==${{ env.VIRTUALENV_VERSION }} - name: Auth google - uses: google-github-actions/auth@v0 + uses: google-github-actions/auth@v2 with: credentials_json: ${{ secrets.GCLOUD_PRODUCTION_RELEASE_SA }} project_id: ${{ secrets.GCLOUD_PRODUCTION_PROJECT }} create_credentials_file: true - name: Setup gcloud - uses: google-github-actions/setup-gcloud@v0 + uses: google-github-actions/setup-gcloud@v2 with: version: ${{ env.GCLOUD_VERSION }} project_id: ${{ secrets.GCLOUD_PRODUCTION_PROJECT }} diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index ca5cefc49..35d806c76 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -97,7 +97,6 @@ jobs: pr_title: Merge release into main branch pr_body: | This PR merges the release branch back into main. - This happens to ensure that the updates that happend on the stable branch. - name: Merge PR if possible continue-on-error: true env: diff --git a/.github/workflows/redshift.yml b/.github/workflows/redshift.yml index 35efbd419..b16fcb445 100644 --- a/.github/workflows/redshift.yml +++ b/.github/workflows/redshift.yml @@ -169,13 +169,13 @@ jobs: unzip awscliv2.zip ./aws/install - name: Auth google - uses: google-github-actions/auth@v0 + uses: google-github-actions/auth@v2 with: credentials_json: ${{ secrets.GCLOUD_PRODUCTION_RELEASE_SA }} project_id: ${{ secrets.GCLOUD_PRODUCTION_PROJECT }} create_credentials_file: true - name: Setup gcloud - uses: google-github-actions/setup-gcloud@v0 + uses: google-github-actions/setup-gcloud@v2 with: version: ${{ env.GCLOUD_VERSION }} project_id: ${{ secrets.GCLOUD_PRODUCTION_PROJECT }} diff --git a/.github/workflows/snowflake.yml b/.github/workflows/snowflake.yml index 8a84d7d9f..b0c086b82 100644 --- a/.github/workflows/snowflake.yml +++ b/.github/workflows/snowflake.yml @@ -195,13 +195,13 @@ jobs: with: node-version: ${{ env.NODE_VERSION }} - name: Auth google - uses: google-github-actions/auth@v0 + uses: google-github-actions/auth@v2 with: credentials_json: ${{ secrets.GCLOUD_PRODUCTION_RELEASE_SA }} project_id: ${{ secrets.GCLOUD_PRODUCTION_PROJECT }} create_credentials_file: true - name: Setup gcloud - uses: google-github-actions/setup-gcloud@v0 + uses: google-github-actions/setup-gcloud@v2 with: version: ${{ env.GCLOUD_VERSION }} project_id: ${{ secrets.GCLOUD_PRODUCTION_PROJECT }} From 4ca0a38f16c5b340399560e17d87a398963ead98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Arroyo=20Torrens?= Date: Thu, 28 Nov 2024 16:33:24 +0100 Subject: [PATCH 2/2] chore: update gh actions versions --- .github/workflows/bigquery-ded.yml | 2 +- .github/workflows/bigquery.yml | 2 +- .github/workflows/databricks.yml | 2 +- .github/workflows/postgres.yml | 2 +- .github/workflows/redshift.yml | 2 +- .github/workflows/snowflake.yml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/bigquery-ded.yml b/.github/workflows/bigquery-ded.yml index a8e0e65e1..636dbeb61 100644 --- a/.github/workflows/bigquery-ded.yml +++ b/.github/workflows/bigquery-ded.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-20.04 timeout-minutes: 20 env: - GCLOUD_VERSION: 290.0.1 + GCLOUD_VERSION: 500.0.0 BQ_PROJECT: ${{ secrets.BQ_PROJECT_CD }} BQ_REGION: ${{ secrets.BQ_REGION_CD }} BQ_BUCKET: ${{ secrets.BQ_BUCKET_CD }} diff --git a/.github/workflows/bigquery.yml b/.github/workflows/bigquery.yml index 6dc8bcedc..ad315d205 100644 --- a/.github/workflows/bigquery.yml +++ b/.github/workflows/bigquery.yml @@ -18,7 +18,7 @@ env: NODE_VERSION: 14 PYTHON3_VERSION: 3.8.10 VIRTUALENV_VERSION: 20.21.1 - GCLOUD_VERSION: 290.0.1 + GCLOUD_VERSION: 500.0.0 jobs: diff --git a/.github/workflows/databricks.yml b/.github/workflows/databricks.yml index f0aefa854..23ad6904a 100644 --- a/.github/workflows/databricks.yml +++ b/.github/workflows/databricks.yml @@ -17,7 +17,7 @@ on: env: PYTHON3_VERSION: 3.8.11 VIRTUALENV_VERSION: 20.21.1 - GCLOUD_VERSION: 290.0.1 + GCLOUD_VERSION: 500.0.0 GOOGLE_SECRET_MANAGER_PROJECT: ${{ secrets.GOOGLE_SECRET_MANAGER_PROJECT }} jobs: diff --git a/.github/workflows/postgres.yml b/.github/workflows/postgres.yml index 7543f9d7f..813c620d2 100644 --- a/.github/workflows/postgres.yml +++ b/.github/workflows/postgres.yml @@ -18,7 +18,7 @@ env: NODE_VERSION: 14 PYTHON3_VERSION: 3.8.10 VIRTUALENV_VERSION: 20.21.1 - GCLOUD_VERSION: 290.0.1 + GCLOUD_VERSION: 500.0.0 jobs: diff --git a/.github/workflows/redshift.yml b/.github/workflows/redshift.yml index b16fcb445..5fbe9a858 100644 --- a/.github/workflows/redshift.yml +++ b/.github/workflows/redshift.yml @@ -19,7 +19,7 @@ env: PYTHON2_VERSION: 2.7.18 PYTHON3_VERSION: 3.8.10 VIRTUALENV_VERSION: 20.15.1 - GCLOUD_VERSION: 290.0.1 + GCLOUD_VERSION: 500.0.0 jobs: diff --git a/.github/workflows/snowflake.yml b/.github/workflows/snowflake.yml index b0c086b82..456e76ea4 100644 --- a/.github/workflows/snowflake.yml +++ b/.github/workflows/snowflake.yml @@ -18,7 +18,7 @@ env: NODE_VERSION: 18.16 PYTHON3_VERSION: 3.8.18 VIRTUALENV_VERSION: 20.21.1 - GCLOUD_VERSION: 290.0.1 + GCLOUD_VERSION: 500.0.0 jobs: