-
Notifications
You must be signed in to change notification settings - Fork 21
55 lines (54 loc) · 2.18 KB
/
create_feedstock_pr.yaml
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
on:
workflow_dispatch:
inputs:
version:
description: 'released PyPI version to use (ex - v1.11.1)'
required: true
name: Create Feedstock PR
jobs:
create_feedstock_pr:
name: Create Feedstock PR
runs-on: ubuntu-latest
steps:
- name: Checkout inputted version
uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.inputs.version }}
path: "./woodwork"
- name: Pull latest from upstream for user forked feedstock
run: |
gh auth status
gh repo sync alteryx/woodwork-feedstock --branch main --source conda-forge/woodwork-feedstock --force
env:
GITHUB_TOKEN: ${{ secrets.AUTO_APPROVE_TOKEN }}
- uses: actions/checkout@v3
with:
repository: alteryx/woodwork-feedstock
ref: main
path: "./woodwork-feedstock"
fetch-depth: '0'
- name: Run Create Feedstock meta YAML
id: create-feedstock-meta
uses: alteryx/create-feedstock-meta-yaml@v4
with:
project: "woodwork"
pypi_version: ${{ github.event.inputs.version }}
project_metadata_filepath: "woodwork/pyproject.toml"
meta_yaml_filepath: "woodwork-feedstock/recipe/meta.yaml"
- name: View updated meta yaml
run: cat woodwork-feedstock/recipe/meta.yaml
- name: Push updated yaml
run: |
cd woodwork-feedstock
git config --unset-all http.https://github.com/.extraheader
git config --global user.email "[email protected]"
git config --global user.name "machineAYX Bot"
git remote set-url origin https://${{ secrets.AUTO_APPROVE_TOKEN }}@github.com/alteryx/woodwork-feedstock
git checkout -b ${{ github.event.inputs.version }}
git add recipe/meta.yaml
git commit -m "auto commit"
git push origin ${{ github.event.inputs.version }}
- name: Adding URL to job output
run: |
echo "Conda Feedstock Pull Request: https://github.com/alteryx/woodwork-feedstock/pull/new/${{ github.event.inputs.version }}" >> $GITHUB_STEP_SUMMARY