Skip to content

Commit

Permalink
allow only docker release
Browse files Browse the repository at this point in the history
  • Loading branch information
emmyoop committed Apr 16, 2024
1 parent d0cc68e commit 4470c53
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ on:
type: boolean
default: false
required: false
only_docker:
description: "Only release Docker image, skip GitHub & PyPI"
type: boolean
default: false
required: false

permissions:
contents: write # this is the permission that allows creating a new release
Expand Down Expand Up @@ -99,6 +104,7 @@ jobs:
bump-version-generate-changelog:
name: Bump package version, Generate changelog
needs: [job-setup]
if: ${{ !inputs.only_docker}}

uses: dbt-labs/dbt-release/.github/workflows/release-prep.yml@main

Expand All @@ -114,7 +120,7 @@ jobs:

log-outputs-bump-version-generate-changelog:
name: "[Log output] Bump package version, Generate changelog"
if: ${{ !failure() && !cancelled() }}
if: ${{ !failure() && !cancelled() && !inputs.only_docker}}

needs: [bump-version-generate-changelog]

Expand All @@ -128,7 +134,7 @@ jobs:
build-test-package:
name: Build, Test, Package
if: ${{ !failure() && !cancelled() }}
if: ${{ !failure() && !cancelled() && !inputs.only_docker}}
needs: [job-setup, bump-version-generate-changelog]

uses: dbt-labs/dbt-release/.github/workflows/build.yml@main
Expand All @@ -149,7 +155,7 @@ jobs:

github-release:
name: GitHub Release
if: ${{ !failure() && !cancelled() }}
if: ${{ !failure() && !cancelled() && !inputs.only_docker}}

needs: [bump-version-generate-changelog, build-test-package]

Expand Down Expand Up @@ -180,6 +186,7 @@ jobs:
# dbt-postgres exists within dbt-core for versions 1.7 and earlier but is a separate package for 1.8 and later.
# determine if we need to release dbt-core or both dbt-core and dbt-postgres
name: Determine Docker Package
if: ${{ !failure() && !cancelled() }}
runs-on: ubuntu-latest
needs: [pypi-release]
outputs:
Expand All @@ -204,6 +211,10 @@ jobs:
docker-release:
name: "Docker Release for ${{ matrix.package }}"
needs: [determine-docker-package]
# We cannot release to docker on a test run because it uses the tag in GitHub as
# what we need to release but draft releases don't actually tag the commit so it
# finds nothing to release
if: ${{ !inputs.test_run || inputs.only_docker }}
strategy:
matrix: ${{fromJson(needs.determine-docker-package.outputs.matrix)}}

Expand Down

0 comments on commit 4470c53

Please sign in to comment.