-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8d0b0cd
commit c2da70c
Showing
34 changed files
with
1,065 additions
and
1,265 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: "Update dev branches" | ||
description: "Update dev branches for testing cross-repo changes" | ||
|
||
inputs: | ||
dbt-adapters-branch: | ||
description: "The branch/tag of `dbt-adapters` to use" | ||
default: "" | ||
dbt-common-branch: | ||
description: "The branch/tag of `dbt-common` to use" | ||
default: "" | ||
dbt-core-branch: | ||
description: "The branch/tag of `dbt-core` to use" | ||
default: "" | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: "[DEBUG] Inputs" | ||
shell: bash | ||
run: | | ||
echo dbt-adapters : ${{ inputs.dbt-adapters-branch }} | ||
echo dbt-common : ${{ inputs.dbt-common-branch }} | ||
echo dbt-core : ${{ inputs.dbt-core-branch }} | ||
- name: "Update `dbt-adapters` branch" | ||
if: ${{ inputs.dbt-adapters-branch }} | ||
shell: bash | ||
run: ./.github/actions/update-dev-branches/update_dev_branch.sh "dbt-adapters" ${{ inputs.dbt-adapters-branch }} | ||
|
||
- name: "Update `dbt-common` branch" | ||
if: ${{ inputs.dbt-common-branch }} | ||
shell: bash | ||
run: ./.github/actions/update-dev-branches/update_dev_branch.sh "dbt-common" ${{ inputs.dbt-common-branch }} | ||
|
||
- name: "Update `dbt-core` branch" | ||
if: ${{ inputs.dbt-core-branch }} | ||
shell: bash | ||
run: ./.github/actions/update-dev-branches/update_dev_branch.sh "dbt-core" ${{ inputs.dbt-core-branch }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash -e | ||
set -e | ||
|
||
package=$1 | ||
branch=$2 | ||
|
||
file="pyproject.toml" | ||
sed_pattern="s|${package}.git@main*|${package}.git@${branch}|g" | ||
|
||
# mac ships with a different version of sed that requires a delimiter arg | ||
if [[ "$OSTYPE" == darwin* ]]; then | ||
sed -i "" "$sed_pattern" $file | ||
else | ||
sed -i "$sed_pattern" $file | ||
fi |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ name: "Bot changelog" | |
|
||
on: | ||
pull_request: | ||
|
||
types: | ||
- opened | ||
- labeled | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# **what?** | ||
# Verifies python build on all code commited to the repository. This workflow | ||
# should not require any secrets since it runs for PRs from forked repos. By | ||
# default, secrets are not passed to workflows running from a forked repos. | ||
|
||
# **why?** | ||
# Ensure code for dbt meets a certain quality standard. | ||
|
||
# **when?** | ||
# This will run for all PRs, when code is pushed to main, and when manually triggered. | ||
name: "Build release" | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
branch: | ||
description: "The branch/tag to run integration tests on" | ||
type: string | ||
default: "main" | ||
archive-name: | ||
description: "The name to use for the upload archive, leave blank for no upload" | ||
type: string | ||
default: "" | ||
workflow_dispatch: | ||
inputs: | ||
branch: | ||
description: "The branch/tag to run integration tests on" | ||
type: string | ||
default: "main" | ||
archive-name: | ||
description: "The name to use for the upload archive, leave blank for no upload" | ||
type: string | ||
default: "" | ||
|
||
permissions: read-all | ||
|
||
concurrency: | ||
group: "${{ github.workflow }}-${{ github.event_name }}-${{ inputs.archive-name }}" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
name: "Build a release" | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | ||
steps: | ||
- name: "Check out ${{ github.repository }}@${{ inputs.branch }}" | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ inputs.branch }} | ||
|
||
- name: "Setup environment" | ||
uses: dbt-labs/dbt-adapters/.github/actions/setup-environment@update-workflows | ||
with: | ||
python-version: ${{ vars.DBT_TEST_PYTHON_VERSION }} | ||
|
||
- name: "Build ${{ github.event.repository.name }}" | ||
uses: dbt-labs/dbt-adapters/.github/actions/build-artifacts@update-workflows | ||
with: | ||
archive-name: ${{ inputs.archive-name }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# **what?** | ||
# Checks that a file has been committed under the /.changes directory | ||
# as a new CHANGELOG entry. Cannot check for a specific filename as | ||
# it is dynamically generated by change type and timestamp. | ||
# This workflow should not require any secrets since it runs for PRs | ||
# from forked repos. | ||
# By default, secrets are not passed to workflows running from | ||
# a forked repo. | ||
# | ||
# **why?** | ||
# Ensure code changes are reflected in the CHANGELOG. | ||
# | ||
# **when?** | ||
# This will run for all PRs going into main and *.latest. It will run when: | ||
# - the PR is opened or reopened | ||
# - labels are updated on the PR | ||
# - new code is pushed to the branch | ||
# The action will get skipped if the 'Skip Changelog' label is present. | ||
name: Check Changelog Entry | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- labeled | ||
- unlabeled | ||
- synchronize | ||
workflow_dispatch: | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: write | ||
|
||
jobs: | ||
changelog: | ||
uses: dbt-labs/actions/.github/workflows/changelog-existence.yml@main | ||
with: | ||
changelog_comment: "Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the [dbt-redshift contributing guide](https://github.com/dbt-labs/dbt-redshift/blob/main/CONTRIBUTING.md)." | ||
skip_label: "Skip Changelog" | ||
# this is only acceptable because we own the action we're calling | ||
secrets: inherit |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# **what?** | ||
# Cleanup branches left over from automation and testing. | ||
# Also cleanup draft releases from release testing. | ||
# | ||
# **why?** | ||
# The automations are leaving behind branches and releases that clutter the repository. | ||
# Sometimes we need them to debug processes so we don't want them immediately deleted. | ||
# Running on Saturday to avoid running at the same time as an actual release | ||
# to prevent breaking a release mid-release. | ||
# | ||
# **when?** | ||
# - every Saturday at noon UTC | ||
# - manually | ||
name: "Clean repo" | ||
|
||
on: | ||
schedule: | ||
- cron: '0 12 * * SAT' # noon UTC on Saturday - details in `why` above | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
cleanup-repo: | ||
uses: dbt-labs/actions/.github/workflows/repository-cleanup.yml@main | ||
secrets: inherit |
Oops, something went wrong.