Skip to content

chore(ci): add automatic release workflow for generic Actors #380

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

Merged
merged 9 commits into from
Apr 23, 2025
76 changes: 76 additions & 0 deletions .github/workflows/release-generic-actors.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Build generic Actors

on:
workflow_dispatch:
inputs:
web-scraper:
description: apify/web-scraper
type: boolean
required: false
default: true
cheerio-scraper:
description: apify/cheerio-scraper
type: boolean
required: false
default: true
playwright-scraper:
description: apify/playwright-scraper
type: boolean
required: false
default: true
puppeteer-scraper:
description: apify/puppeteer-scraper
type: boolean
required: false
default: true
jsdom-scraper:
description: apify/jsdom-scraper
type: boolean
required: false
default: true
camoufox-scraper:
description: apify/camoufox-scraper
type: boolean
required: false
default: true
version:
description: Version to build
type: string
required: true
default: '3.0'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how does this work? some of the scrapers are on a lower version since they are newer, e.g. playwright and jsdom

also can this be used to trigger the development build of all of them at once?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some of the scrapers are on a lower version since they are newer, e.g. playwright and jsdom

Ah, that's annoying, and I missed that. We can omit the version param altogether if we set the version right in the .apify/actor.json file. Right now, there's just a bunch of top-level apify.json files.

also can this be used to trigger the development build of all of them at once?

I don't see why not, even though we'll need to make sure all the development versions match.

Thinking about it now, it might be better to replace the build-tag and version options with a "build type" choice (picker with latest / beta / canary or something similar) and have the logic in the action internally. We might want to match all the Actor versions on the platform, so the implementation is easier, but I'm not sure about the implications of this.

build-tag:
description: Build tag
type: string
required: true
default: version-3

jobs:
push-to-apify:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
settings:
- actor: web-scraper
should-build: ${{ github.event.inputs.web-scraper }}
- actor: cheerio-scraper
should-build: ${{ github.event.inputs.cheerio-scraper }}
- actor: playwright-scraper
should-build: ${{ github.event.inputs.playwright-scraper }}
- actor: puppeteer-scraper
should-build: ${{ github.event.inputs.puppeteer-scraper }}
- actor: jsdom-scraper
should-build: ${{ github.event.inputs.jsdom-scraper }}
- actor: camoufox-scraper
should-build: ${{ github.event.inputs.camoufox-scraper }}
steps:
- uses: actions/checkout@v4

- name: Build ${{ matrix.settings.actor }}
uses: apify/push-actor-action@master
if: matrix.settings.should-build == 'true'
with:
token: ${{ secrets.APIFY_ACTOR_BUILD_TOKEN }}
build-tag: ${{ github.event.inputs.build-tag }}
version: ${{ github.event.inputs.version }}
working-directory: packages/actor-scraper/${{ matrix.settings.actor }}
Loading