Skip to content

webservices-workflow-dispatch #19562

webservices-workflow-dispatch

webservices-workflow-dispatch #19562

name: webservices-workflow-dispatch
on:
workflow_dispatch:
inputs:
task:
description: 'the task to perform'
required: true
type: string
repo:
description: 'the repository to run on'
required: true
type: string
pr_number:
description: 'the pull request number'
required: true
type: string
container_tag:
description: 'the container tag to use'
required: true
type: string
requested_version:
description: 'the requested version for a version update'
required: false
type: string
default: 'null'
env:
PY_COLORS: 1
defaults:
run:
shell: bash -leo pipefail {0}
permissions: {}
jobs:
init-task:
name: init-task
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
with:
fetch-depth: 0
ref: ${{ github.ref }}
- name: setup conda
uses: mamba-org/setup-micromamba@f8b8a1e23a26f60a44c853292711bacfd3eac822
with:
environment-file: conda-lock.yml
environment-name: webservices
condarc: |
show_channel_urls: true
channel_priority: strict
channels:
- conda-forge
- name: install code
run: |
pip install --no-deps --no-build-isolation -e .
- name: init task
run: |
git config --global user.name "conda-forge-webservices[bot]"
git config --global user.email "91080706+conda-forge-webservices[bot]@users.noreply.github.com"
export CF_FEEDSTOCK_OPS_CONTAINER_NAME=condaforge/webservices-dispatch-action
export CF_FEEDSTOCK_OPS_CONTAINER_TAG="${{ inputs.container_tag }}"
conda-forge-webservices-init-task \
--task=${{ inputs.task }} \
--repo=${{ inputs.repo }} \
--pr-number=${{ inputs.pr_number }}
env:
GH_TOKEN: ${{ secrets.CF_ADMIN_GITHUB_TOKEN }}
run-task:
name: run-task
runs-on: ubuntu-latest
needs:
- init-task
steps:
- name: checkout code
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
with:
fetch-depth: 0
ref: ${{ github.ref }}
- name: setup conda
uses: mamba-org/setup-micromamba@f8b8a1e23a26f60a44c853292711bacfd3eac822
with:
environment-file: conda-lock.yml
environment-name: webservices
condarc: |
show_channel_urls: true
channel_priority: strict
channels:
- conda-forge
- name: install code
run: |
pip install --no-deps --no-build-isolation -e .
- name: run task
run: |
git config --global user.name "conda-forge-webservices[bot]"
git config --global user.email "91080706+conda-forge-webservices[bot]@users.noreply.github.com"
export CF_FEEDSTOCK_OPS_CONTAINER_NAME=condaforge/webservices-dispatch-action
export CF_FEEDSTOCK_OPS_CONTAINER_TAG="${{ inputs.container_tag }}"
conda-forge-webservices-run-task \
--task=${{ inputs.task }} \
--repo=${{ inputs.repo }} \
--pr-number=${{ inputs.pr_number }} \
--task-data-dir=${{ github.workspace }}/task-data \
--requested-version=${{ inputs.requested_version }}
- name: upload task data
id: upload-task-data
uses: actions/upload-artifact@v4
with:
name: task-data-${{ inputs.task }}-${{ inputs.repo }}-${{ inputs.pr_number }}-${{ github.run_id }}-${{ github.run_number }}
path: ${{ github.workspace }}/task-data
retention-days: 2
include-hidden-files: true
finalize-task:
name: finalize-task
runs-on: ubuntu-latest
needs:
- run-task
steps:
- name: checkout code
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
with:
fetch-depth: 0
ref: ${{ github.ref }}
- name: setup conda
uses: mamba-org/setup-micromamba@f8b8a1e23a26f60a44c853292711bacfd3eac822
with:
environment-file: conda-lock.yml
environment-name: webservices
condarc: |
show_channel_urls: true
channel_priority: strict
channels:
- conda-forge
- name: install code
run: |
pip install --no-deps --no-build-isolation -e .
- name: download task data
uses: actions/download-artifact@v4
with:
name: task-data-${{ inputs.task }}-${{ inputs.repo }}-${{ inputs.pr_number }}-${{ github.run_id }}-${{ github.run_number }}
path: ${{ github.workspace }}/task-data
- name: finalize task
run: |
git config --global user.name "conda-forge-webservices[bot]"
git config --global user.email "91080706+conda-forge-webservices[bot]@users.noreply.github.com"
export CF_FEEDSTOCK_OPS_CONTAINER_NAME=condaforge/webservices-dispatch-action
export CF_FEEDSTOCK_OPS_CONTAINER_TAG="${{ inputs.container_tag }}"
conda-forge-webservices-finalize-task \
--task-data-dir=${{ github.workspace }}/task-data
env:
GH_TOKEN: ${{ secrets.CF_ADMIN_GITHUB_TOKEN }}