-
Notifications
You must be signed in to change notification settings - Fork 54
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
6792117
commit d5f280b
Showing
2 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
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,22 @@ | ||
name: "Bot commit" | ||
description: "Commit to a local branch using the build bot" | ||
|
||
inputs: | ||
message: | ||
description: "The commit message" | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- run: | | ||
git config user.name $USERNAME | ||
git config user.email $EMAIL | ||
git pull | ||
git add . | ||
git commit -m "$MESSAGE" | ||
git push | ||
env: | ||
USERNAME: "Github Build Bot" | ||
EMAIL: "[email protected]" | ||
MESSAGE: "[Automated] ${{ inputs.message }}" |
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,75 @@ | ||
name: "Bump version" | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
package: | ||
description: "Choose the package to bump" | ||
type: string | ||
required: true | ||
branch: | ||
description: "Choose the branch to use" | ||
type: string | ||
default: "main" | ||
version: | ||
description: "Choose the version to bump to (e.g. 1.2.3rc1, patch, release)" | ||
type: string | ||
default: "beta" | ||
secrets: | ||
FISHTOWN_BOT_PAT: | ||
description: "Token to commit/merge changes into branches" | ||
required: true | ||
workflow_dispatch: | ||
inputs: | ||
package: | ||
description: "Choose the package to bump" | ||
type: choice | ||
options: | ||
- "dbt-adapters" | ||
- "dbt-tests-adapter" | ||
- "dbt-athena" | ||
- "dbt-bigquery" | ||
- "dbt-postgres" | ||
- "dbt-redshift" | ||
- "dbt-snowflake" | ||
- "dbt-spark" | ||
branch: | ||
description: "Choose the branch to use" | ||
type: string | ||
default: "main" | ||
version: | ||
description: "Choose the version to bump to (e.g. 1.2.3rc1, patch, release)" | ||
type: string | ||
default: "beta" | ||
secrets: | ||
FISHTOWN_BOT_PAT: | ||
description: "Token to commit/merge changes into branches" | ||
required: true | ||
|
||
permissions: | ||
contents: write | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
main: | ||
runs-on: ${{ vars.DEFAULT_RUNNER }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ inputs.branch }} | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ vars.DEFAULT_PYTHON_VERSION }} | ||
- uses: pypa/hatch@install | ||
- id: version | ||
run: | | ||
echo "initial=$(hatch version)" >> $GITHUB_OUTPUT | ||
hatch version ${{ inputs.version }} | ||
echo "final=$(hatch version)" >> $GITHUB_OUTPUT | ||
working-directory: ./${{ inputs.package }} | ||
- uses: ./.github/actions/bot-commit | ||
with: | ||
message: "Bump version from ${{ steps.version.outputs.initial }} to ${{ steps.version.outputs.final }}" |