starting work on yearly RA GTS metrics #192
Workflow file for this run
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: Collect quarterly metrics | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - '.github/workflows/metrics.yml' | |
| - 'btn_metrics.py' | |
| schedule: | |
| - cron: "0 12 5 * *" | |
| workflow_dispatch: | |
| jobs: | |
| scheduled: | |
| runs-on: ubuntu-20.04 | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Setup Pixi | |
| uses: prefix-dev/setup-pixi@v0.8.5 | |
| with: | |
| manifest-path: pyproject.toml | |
| - name: echo secrets into a file | |
| shell: bash -l {0} | |
| env: | |
| CDMO_KEY : ${{ secrets.CDMO_KEY }} | |
| CDMO_NAME : ${{ secrets.CDMO_NAME }} | |
| run: | | |
| echo "CDMO_NAME = \"${CDMO_NAME}\"" > config.py | |
| echo "CDMO_KEY = \"${CDMO_KEY}\"" >> config.py | |
| - name: Collect quarterly GTS and BTN metrics | |
| shell: bash -l {0} | |
| run: | | |
| pixi run metrics | |
| - name: Get current date | |
| run: echo "NOW=$(date -u)" >> ${GITHUB_ENV} | |
| - name: Create Pull Request | |
| if: github.ref == 'refs/heads/main' | |
| id: cpr | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| commit-message: "Latest data: ${{ env.NOW }}" | |
| branch: update-webpage | |
| delete-branch: true | |
| title: "[metrics-ci] webpage auto-update" | |
| body: | | |
| Metrics Webpage auto-udpate. | |
| labels: | | |
| Bot | |
| assignees: | | |
| MathewBiddle | |
| reviewers: | | |
| MathewBiddle | |
| - name: Check outputs | |
| if: ${{ steps.cpr.outputs.pull-request-number }} | |
| run: | | |
| echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" | |
| echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" |