Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RHOAIENG-15020: Add a dry mode option to the Release workflow - Without reusable workflow (#81) #82

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,28 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
name: Elyra Release - Build
name: Elyra Release
on:
workflow_call:
schedule:
- cron: "0 4 * * *" # 4am UTC everyday
pull_request:
branches: [ "**" ]
paths:
- ".github/workflows/release*"
push:
tags:
- v*
workflow_dispatch:
inputs:
tag:
type: string
required: true
description: "Tag associated with the release (e.g.: v4.0.0)"
dry_run:
type: boolean
required: true
base_ref:
type: string
required: true
default: true
description: "Indicates if it is a dry run, when artifacts are not published"

env:
FORCE_COLOR: true
Expand All @@ -41,7 +53,7 @@ jobs:
- name: Check out the repository
uses: actions/checkout@v4
with:
ref: ${{ inputs.base_ref }}
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref }}
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
Expand All @@ -57,7 +69,7 @@ jobs:
yarn set version ${{ env.YARN_VERSION }}
yarn --version
- name: Check version
if: ${{ !inputs.dry_run && github.repository_owner == 'opendatahub-io' }}
if: ${{ github.repository_owner == 'opendatahub-io' && (github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && !inputs.dry_run)) }}
run: |
set -o pipefail
LATEST_TAG=$(git describe --tags --match="v*")
Expand All @@ -70,7 +82,7 @@ jobs:
run: |
make install-prod
- name: Publish package on PyPI
if: ${{ !inputs.dry_run && github.repository_owner == 'opendatahub-io' }}
if: ${{ github.repository_owner == 'opendatahub-io' && (github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && !inputs.dry_run)) }}
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
Expand Down
41 changes: 0 additions & 41 deletions .github/workflows/release_dry_run.yml

This file was deleted.

33 changes: 0 additions & 33 deletions .github/workflows/release_publish.yml

This file was deleted.