Repository navigation
75 lines (74 loc) · 2.66 KB
/
Copy pathlib-setup-install.yaml
File metadata and controls
75 lines (74 loc) · 2.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
on:
workflow_call:
inputs:
distro:
description: "Distro to install with"
type: string
required: true
repo:
description: "Repository to install"
type: string
required: true
target-stage:
description: "Release status to install"
type: string
required: true
secrets:
token:
description: "GitHub token"
required: true
jobs:
setup:
runs-on: ubuntu-latest
outputs:
epoch: ${{ inputs.target-stage == 'qiime2-latest' && fromJSON(steps.yaml.outputs.data).active_epoch || fromJSON(steps.yaml.outputs.data).released_epoch }}
pip-spec: ${{ steps.set-vars.outputs.repo }} @ git+${{ github.repositoryUrl }}
repo: ${{ steps.set-vars.outputs.repo }}
steps:
- uses: actions/checkout@v4
with:
repository: qiime2/distributions
sparse-checkout: |
data.yaml
- name: "get distro info"
id: yaml
uses: qiime2/distributions/.github/actions/read-yaml@dev
with:
file: data.yaml
- id: set-vars
run: |
REPO=$(echo "${{ github.repository }}" | cut -d '/' -f 2)
echo "repo=$REPO" >> $GITHUB_OUTPUT
job:
runs-on: ubuntu-latest
needs: [setup]
steps:
- uses: actions/setup-python@v5
with:
python-version: 3.9
- shell: bash
run: pip install pyyaml
- uses: actions/checkout@v4
- run: |
mkdir -p ./environments/
- uses: qiime2/action-library-packaging/setup-plugin-env-file@beta
with:
environment-fp: ./environments/${{ needs.setup.outputs.repo }}-${{ inputs.target-stage }}-environment.yml
pip-spec: ${{ needs.setup.outputs.pip-spec }}
epoch: ${{ needs.setup.outputs.epoch }}
distro: ${{ inputs.distro }}
# Replaces qiime2/create-pull-request@v5
# (previously forked from peter-evans/create-pull-request)
uses: qiime2-cutlery/create-pull-request@v5
with:
token: ${{ secrets.token }}
branch: "update-environment-file"
title: "update environment file for ${{ inputs.target-stage }} ${{ needs.setup.outputs.epoch }}"
body: |
This is an automated pull request that updates the environment file for
to use ${{ inputs.target-stage }} ${{ needs.setup.outputs.epoch }}.
🛠️
author: "q2d2 <q2d2.noreply@gmail.com>"
committer: "q2d2 <q2d2.noreply@gmail.com>"
commit-message: |
"update environment file for ${{ inputs.target-stage }} ${{ needs.setup.outputs.epoch }}"