Publish internal - emmyoop - package:dbt-snowflake branch:main skip-unit-tests:false skip-integration-tests:false #49
This file contains hidden or 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
| # **what?** | |
| # Orchestrates the internal publishing process: runs tests and publishes packages to AWS CodeArtifact. | |
| # **why?** | |
| # Ensures packages are tested before being published internally for use by dbt Cloud and other internal tools. | |
| # **when?** | |
| # This workflow can be manually triggered via workflow_dispatch or called by other workflows (like scheduled-publishing.yml). | |
| name: "Publish internal" | |
| run-name: "Publish internal - ${{ github.actor }} - package:${{ inputs.package }} branch:${{ inputs.branch }} skip-unit-tests:${{ inputs.skip-unit-tests }} skip-integration-tests:${{ inputs.skip-integration-tests }}" | |
| permissions: | |
| id-token: write | |
| contents: read | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| package: | |
| description: "Choose the package to publish" | |
| type: choice | |
| options: | |
| - "dbt-athena" | |
| - "dbt-bigquery" | |
| - "dbt-postgres" | |
| - "dbt-redshift" | |
| - "dbt-snowflake" | |
| - "dbt-spark" | |
| branch: | |
| description: "Choose the branch to publish from" | |
| type: string | |
| default: "main" | |
| skip-unit-tests: | |
| description: "Skip running unit tests" | |
| type: boolean | |
| default: false | |
| skip-integration-tests: | |
| description: "Skip running integration tests" | |
| type: boolean | |
| default: false | |
| workflow_call: | |
| inputs: | |
| package: | |
| description: "Choose the package to publish" | |
| type: string | |
| required: true | |
| branch: | |
| description: "Choose the branch to publish from" | |
| type: string | |
| default: "main" | |
| skip-unit-tests: | |
| description: "Skip running unit tests" | |
| type: boolean | |
| default: false | |
| skip-integration-tests: | |
| description: "Skip running integration tests" | |
| type: boolean | |
| default: false | |
| jobs: | |
| unit-tests: | |
| if: inputs.skip-unit-tests == false | |
| uses: ./.github/workflows/_unit-tests.yml | |
| with: | |
| package: ${{ inputs.package }} | |
| branch: ${{ inputs.branch }} | |
| hatch-env: "ci" | |
| integration-tests: | |
| if: inputs.skip-integration-tests == false | |
| uses: ./.github/workflows/_integration-tests.yml | |
| with: | |
| packages: ${{ toJSON(inputs.package) }} | |
| branch: ${{ inputs.branch }} | |
| hatch-env: "ci" | |
| secrets: inherit | |
| publish-internal: | |
| if: ${{ !failure() && !cancelled() }} | |
| needs: [unit-tests, integration-tests] | |
| uses: ./.github/workflows/_publish-internal.yml | |
| with: | |
| package: ${{ inputs.package }} | |
| branch: ${{ inputs.branch }} | |
| secrets: inherit |