fix(ci): add delay to avoid hitting rate limits #4
This file contains hidden or 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
| # Reuild images daily | |
| name: Rebuild images | |
| on: | |
| schedule: | |
| - cron: "0 2 * * *" | |
| workflow_dispatch: | |
| inputs: | |
| image-name: | |
| description: "Name of the image to rebuild" | |
| required: true | |
| push: | |
| jobs: | |
| rebuild-images: | |
| runs-on: ubuntu-latest | |
| name: Rebuild images | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.x" | |
| - name: Setup Poetry | |
| uses: abatilo/actions-poetry@v2 | |
| - name: Install dependencies | |
| continue-on-error: true | |
| working-directory: tools/workflow-engine/charms/temporal-worker | |
| run: poetry install | |
| - name: Trigger auto-updates | |
| working-directory: tools/workflow-engine/charms/temporal-worker/oci_factory/activities/ | |
| env: | |
| OS_AUTH_URL: ${{ secrets.SWIFT_OS_AUTH_URL }} | |
| OS_USERNAME: ${{ secrets.SWIFT_OS_USERNAME }} | |
| OS_PASSWORD: ${{ secrets.SWIFT_OS_PASSWORD }} | |
| OS_PROJECT_NAME: ${{ secrets.SWIFT_OS_TENANT_NAME }} | |
| OS_STORAGE_URL: ${{ secrets.SWIFT_OS_STORAGE_URL }} | |
| GITHUB_TOKEN: ${{ secrets.ROCKSBOT_TOKEN }} | |
| # TODO change the 'mock-rock' to the '*' | |
| run: poetry run python3 find_images_to_update.py --image-name ${{ inputs.image-name || 'mock-rock' }} | |