Skip to content

Commit

Permalink
Refactor image tag generation for bun-node-puppeteer images
Browse files Browse the repository at this point in the history
  • Loading branch information
ImBIOS committed Sep 20, 2024
1 parent a5bad01 commit b41d042
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions .github/workflows/release-bun-node-puppeteer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ on:
inputs:
release_tag:
description: "Tag for the images (e.g.: beta)"
required: true
required: false
apify_version:
description: "Apify SDK version (e.g.: ^1.0.0)"
required: true
required: false
crawlee_version:
description: "Crawlee version (e.g.: ^1.0.0)"
required: true
required: false
puppeteer_version:
description: "Puppeteer version (e.g.: 5.5.0)"
required: true
required: false
is_latest_browser_image:
description: If this is a release of the latest browser image. This gets autofilled by CI in crawlee
type: boolean
Expand All @@ -35,7 +35,7 @@ on:
pull_request:

env:
RELEASE_TAG: ${{ github.event.inputs.release_tag || github.event.client_payload.release_tag || 'CI_TEST' }}
RELEASE_TAG: ${{ github.event.inputs.release_tag || github.event.client_payload.release_tag || 'latest' }}
APIFY_VERSION: ${{ github.event.inputs.apify_version || github.event.client_payload.apify_version }}
CRAWLEE_VERSION: ${{ github.event.inputs.crawlee_version || github.event.client_payload.crawlee_version }}
PUPPETEER_VERSION: ${{ github.event.inputs.puppeteer_version || github.event.client_payload.puppeteer_version }}
Expand Down Expand Up @@ -96,6 +96,21 @@ jobs:
retry_wait_seconds: 60 # wait between retries
command: cd ${{ matrix.image-name }} && npm i --dry-run

- name: Set APIFY_VERSION
# Only run if the input is not set
if: github.event.inputs.apify_version == null
run: echo "APIFY_VERSION=$(npm view apify version)" >> $GITHUB_ENV

- name: Set CRAWLEE_VERSION
# Only run if the input is not set
if: github.event.inputs.crawlee_version == null
run: echo "CRAWLEE_VERSION=$(npm view crawlee version)" >> $GITHUB_ENV

- name: Set PUPPETEER_VERSION
# Only run if the input is not set
if: github.event.inputs.puppeteer_version == null
run: echo "PUPPETEER_VERSION=$(npm view puppeteer version)" >> $GITHUB_ENV

- name: Build and tag image
uses: docker/build-push-action@v5
with:
Expand Down

0 comments on commit b41d042

Please sign in to comment.