event: push boto3 #198827
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: bot-events | |
| run-name: 'event: ${{ inputs.event }} ${{ inputs.uid }}' | |
| concurrency: | |
| group: 'event: ${{ inputs.event }} ${{ inputs.uid }}' | |
| cancel-in-progress: false | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| event: | |
| description: 'The github event.' | |
| required: true | |
| default: null | |
| type: choice | |
| options: | |
| - pr | |
| - push | |
| uid: | |
| description: 'The unique id of the event. For PRs, this is the PR number. For pushes, this is the feedstock name.' | |
| required: true | |
| type: string | |
| dry-run: | |
| description: 'Run the bot in `dry-run` mode, making no changes.' | |
| required: false | |
| default: false | |
| type: boolean | |
| jobs: | |
| react-to-event: | |
| name: react-to-event | |
| runs-on: "ubuntu-latest" | |
| defaults: | |
| run: | |
| shell: bash -leo pipefail {0} | |
| steps: | |
| - name: get latest release | |
| id: latest_release | |
| run: | | |
| tag_name=$(gh api repos/regro/cf-scripts/releases/latest --jq '.tag_name') | |
| echo "latest release: ${tag_name}" | |
| echo "tag_name=${tag_name}" >> "$GITHUB_OUTPUT" | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| with: | |
| ref: ${{ steps.latest_release.outputs.tag_name }} | |
| path: cf-scripts | |
| token: ${{ secrets.AUTOTICK_BOT_TOKEN }} | |
| - uses: mamba-org/setup-micromamba@add3a49764cedee8ee24e82dfde87f5bc2914462 # v2.0.7 | |
| with: | |
| environment-file: cf-scripts/conda-lock.yml | |
| environment-name: cf-scripts | |
| condarc-file: cf-scripts/autotick-bot/condarc | |
| - name: do local setup and stop me if needed | |
| run: | | |
| cd cf-scripts | |
| python autotick-bot/stop_me_if_needed.py | |
| - name: install bot code | |
| if: success() && ! env.CI_SKIP | |
| run: | | |
| source cf-scripts/autotick-bot/install_bot_code.sh \ | |
| --no-clone-graph \ | |
| --no-clean-disk-space \ | |
| --no-pull-container | |
| env: | |
| BOT_TOKEN: ${{ secrets.AUTOTICK_BOT_TOKEN }} | |
| - name: react to event | |
| if: success() && ! env.CI_SKIP | |
| run: | | |
| export RUN_URL="https://github.com/regro/cf-scripts/actions/runs/${RUN_ID}" | |
| if [[ '${{ github.event.inputs.dry-run}}' == 'true' ]]; then | |
| kwargs="--dry-run" | |
| else | |
| kwargs="" | |
| fi | |
| pushd cf-scripts | |
| conda-forge-tick ${kwargs} \ | |
| react-to-event \ | |
| --event='${{ inputs.event }}' \ | |
| --uid='${{ inputs.uid }}' | |
| env: | |
| BOT_TOKEN: ${{ secrets.AUTOTICK_BOT_TOKEN }} | |
| RUN_ID: ${{ github.run_id }} | |
| # emptied at the beginning and end of each run, used by Python tempdir | |
| TMPDIR: ${{ runner.temp }} |