From 232682f4282aa1be3a308affe3c71a0dc4932c4c Mon Sep 17 00:00:00 2001 From: Vlad Frangu Date: Mon, 16 Dec 2024 13:51:13 +0200 Subject: [PATCH] fix: default to matrix apify-version for workflow dispatch with no apify version provided (#148) --- .github/workflows/release-python-playwright.yaml | 9 +++++---- .github/workflows/release-python-selenium.yaml | 5 +++++ .github/workflows/release-python.yaml | 5 +++++ 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-python-playwright.yaml b/.github/workflows/release-python-playwright.yaml index fd86e96..83a0a08 100644 --- a/.github/workflows/release-python-playwright.yaml +++ b/.github/workflows/release-python-playwright.yaml @@ -9,10 +9,6 @@ on: apify_version: description: 'Apify Python SDK version (e.g.: "1.0.0"). If missing, the latest version will be used.' required: false - is_latest_browser_image: - description: If this is a release of the latest browser image. This gets autofilled by CI here - type: boolean - default: false repository_dispatch: types: [build-python-images] @@ -78,6 +74,11 @@ jobs: if [[ -z "$RELEASE_TAG" ]]; then echo "RELEASE_TAG=latest" >> $GITHUB_ENV; fi if [[ -z "$APIFY_VERSION" ]]; then echo "APIFY_VERSION=${{ matrix.apify-version }}" >> $GITHUB_ENV; fi + - name: Set default inputs if event is workflow_dispatch + if: github.event_name == 'workflow_dispatch' + run: | + if [[ -z "$APIFY_VERSION" ]]; then echo "APIFY_VERSION=${{ matrix.apify-version }}" >> $GITHUB_ENV; fi + - name: Check if inputs are set correctly run: | if [[ -z "$RELEASE_TAG" ]]; then echo "RELEASE_TAG input is empty!" >&2; exit 1; fi diff --git a/.github/workflows/release-python-selenium.yaml b/.github/workflows/release-python-selenium.yaml index 900e8fc..51150f3 100644 --- a/.github/workflows/release-python-selenium.yaml +++ b/.github/workflows/release-python-selenium.yaml @@ -74,6 +74,11 @@ jobs: if [[ -z "$RELEASE_TAG" ]]; then echo "RELEASE_TAG=latest" >> $GITHUB_ENV; fi if [[ -z "$APIFY_VERSION" ]]; then echo "APIFY_VERSION=${{ matrix.apify-version }}" >> $GITHUB_ENV; fi + - name: Set default inputs if event is workflow_dispatch + if: github.event_name == 'workflow_dispatch' + run: | + if [[ -z "$APIFY_VERSION" ]]; then echo "APIFY_VERSION=${{ matrix.apify-version }}" >> $GITHUB_ENV; fi + - name: Check if inputs are set correctly run: | if [[ -z "$RELEASE_TAG" ]]; then echo "RELEASE_TAG input is empty!" >&2; exit 1; fi diff --git a/.github/workflows/release-python.yaml b/.github/workflows/release-python.yaml index d59404d..3780379 100644 --- a/.github/workflows/release-python.yaml +++ b/.github/workflows/release-python.yaml @@ -74,6 +74,11 @@ jobs: if [[ -z "$RELEASE_TAG" ]]; then echo "RELEASE_TAG=latest" >> $GITHUB_ENV; fi if [[ -z "$APIFY_VERSION" ]]; then echo "APIFY_VERSION=${{ matrix.apify-version }}" >> $GITHUB_ENV; fi + - name: Set default inputs if event is workflow_dispatch + if: github.event_name == 'workflow_dispatch' + run: | + if [[ -z "$APIFY_VERSION" ]]; then echo "APIFY_VERSION=${{ matrix.apify-version }}" >> $GITHUB_ENV; fi + - name: Check if inputs are set correctly run: | if [[ -z "$RELEASE_TAG" ]]; then echo "RELEASE_TAG input is empty!" >&2; exit 1; fi