Skip to content

bot-update-status-page #83829

bot-update-status-page

bot-update-status-page #83829

name: bot-update-status-page
on:
workflow_dispatch: null
concurrency: update-status-page
jobs:
update_status_page:
name: update-status-page
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
ref: ${{ steps.latest_release.outputs.tag_name }}
path: cf-scripts
- uses: mamba-org/setup-micromamba@617811f69075e3fd3ae68ca64220ad065877f246 # v1
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
env:
BOT_TOKEN: ${{ secrets.AUTOTICK_BOT_TOKEN }}
- name: update status page
if: success() && ! env.CI_SKIP
run: |
pushd cf-graph
conda-forge-tick make-status-report
env:
BOT_TOKEN: ${{ secrets.AUTOTICK_BOT_TOKEN }}
- name: deploy
if: github.ref == 'refs/heads/main' && ! cancelled() && ! env.CI_SKIP
run: |
pushd cf-graph
export RUN_URL="https://github.com/regro/cf-scripts/actions/runs/${RUN_ID}"
conda-forge-tick deploy-to-github
env:
BOT_TOKEN: ${{ secrets.AUTOTICK_BOT_TOKEN }}
RUN_ID: ${{ github.run_id }}
- name: bump on fail
if: github.ref == 'refs/heads/main' && failure() && ! env.CI_SKIP
run: |
export ACTION_URL="https://github.com/regro/cf-scripts/actions/runs/${RUN_ID}"
python cf-scripts/autotick-bot/bump_bot_team.py
env:
BOT_TOKEN: ${{ secrets.AUTOTICK_BOT_TOKEN }}
RUN_ID: ${{ github.run_id }}
ACTION_NAME: ${{ github.workflow }}