main 2 #37707
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
| name: main 2 | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '10/15 * * * *' | |
| jobs: | |
| job1: | |
| runs-on: ubuntu-latest | |
| env: | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_LAM_ACC_KEY }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_LAM_SEC_ACC_KEY }} | |
| AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }} | |
| ACTIVATE_URL: ${{ secrets.ACTIVATE_URL }} | |
| BEARER_TOKEN: ${{ secrets.BEARER_TOKEN }} | |
| AWS_F_NAME: ${{ secrets.AWS_F_NAME }} | |
| FULL_REPO_TOKEN: ${{ secrets.FULL_REPO_TOKEN }} | |
| steps: | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| - uses: actions/checkout@v4 | |
| - run: | | |
| pip install -U --no-index --find-links=./packages pip | |
| pip install --no-index --find-links=./packages -r requirements.txt | |
| - uses: popcube/retry@master | |
| name: primary script | |
| id: primary_script | |
| with: | |
| timeout_minutes: 5 | |
| retry_on: error | |
| max_attempts: 3 | |
| retry_wait_seconds: 90 | |
| continue_on_error: true | |
| command: python ./main.py | |
| - if: ${{ steps.primary_script.outputs.exit_code != 0 }} | |
| name: sub script checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ env.FULL_REPO_TOKEN }} | |
| repository: "popcube/private_script_storage" | |
| path: ./private_script_storage | |
| - if: ${{ steps.primary_script.outputs.exit_code != 0 }} | |
| run: pip install -r ./private_script_storage/requirements.txt | |
| - if: ${{ steps.primary_script.outputs.exit_code != 0 }} | |
| uses: popcube/retry@master | |
| name: secondary script | |
| with: | |
| timeout_minutes: 5 | |
| retry_on: error | |
| max_attempts: 3 | |
| retry_wait_seconds: 90 | |
| command: | | |
| python ./private_script_storage/main.py >& /dev/null | |
| test -e gt.txt && \ | |
| echo "length of gt: $(wc -m gt.txt | sed 's/gt.txt//g')" || \ | |
| echo "gt not found. exitting..." >&2 | exit 1 |