crawlee-docker-image-bump #7375
This file contains 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
name: Docker images | |
# The action runs on pushes to master and new releases only if their respective flows pass | |
on: | |
workflow_dispatch: | |
inputs: | |
crawlee_version: | |
description: Custom crawlee version to deploy (takes precedence over trigger_latest) | |
type: string | |
default: '' | |
trigger_latest: | |
description: Rebuilds all images with the latest crawlee version | |
type: boolean | |
default: false | |
repository_dispatch: | |
types: | |
- crawlee-docker-image-bump | |
schedule: | |
- cron: 0 */1 * * * | |
env: | |
ACTIONS_TOKEN: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }} | |
CRAWLEE_BETA_VERSION: ${{ github.event.inputs.crawlee_version || github.event.client_payload.crawlee_version || '' }} | |
TRIGGER_LATEST: ${{ github.event.inputs.trigger_latest || github.event.client_payload.trigger_latest || false }} | |
jobs: | |
trigger_ci: | |
name: Trigger CI | |
runs-on: ubuntu-latest | |
if: github.repository == 'apify/crawlee' | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }} | |
fetch-depth: 0 | |
- name: Use Bun | |
uses: oven-sh/setup-bun@v2 | |
- name: Install Bun Dependencies | |
run: | | |
pushd ./scripts/actions/docker-images | |
bun install | |
popd | |
- name: Setup git user | |
run: | | |
git config --global user.name "Apify Release Bot" | |
git config --global user.email "[email protected]" | |
- name: Run Docker Action | |
run: | | |
pushd ./scripts/actions/docker-images | |
bun run-ci | |
popd | |
env: | |
ACTIONS_TOKEN: ${{ env.ACTIONS_TOKEN }} | |
CRAWLEE_BETA_VERSION: ${{ env.CRAWLEE_BETA_VERSION }} | |
TRIGGER_LATEST: ${{ env.TRIGGER_LATEST }} | |
- name: Update Docker state | |
run: | | |
git add . | |
git diff-index --quiet HEAD || git commit -m "chore(docker): update docker state [skip ci]" | |
git push |