-
-
Notifications
You must be signed in to change notification settings - Fork 321
53 lines (47 loc) · 1.87 KB
/
repodata_patching.yml
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
name: repodata_patching
on:
schedule:
- cron: '0 0 * * 0'
workflow_dispatch: null
jobs:
repodata_patching:
runs-on: ubuntu-latest
steps:
- name: Prevent multiple jobs running in parallel
id: conversion_lock
uses: beckermr/turnstyle-python@d50fd7e1de14639af00d8dc8e0f60176a99153d9 # v2
with:
abort-after-seconds: 3
poll-interval-seconds: 2
github-token: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
# outcome is evaluated before continue-on-error above
if: steps.conversion_lock.outcome == 'success'
- uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v2
if: steps.conversion_lock.outcome == 'success'
with:
activate-environment: cf
environment-file: environment.yml
auto-activate-base: true
miniforge-version: latest
miniforge-variant: Mambaforge
- name: Generate token
if: steps.conversion_lock.outcome == 'success'
id: generate_token
uses: actions/create-github-app-token@ad38cffc07bac6e3857755914c4c88bfd2db4da4 # v1
with:
app-id: ${{ secrets.CF_CURATOR_APP_ID }}
private-key: ${{ secrets.CF_CURATOR_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: patch repodata
if: steps.conversion_lock.outcome == 'success'
shell: bash -l {0}
run: |
conda activate cf
git config --global user.email "79913779+conda-forge-curator[bot]@users.noreply.github.com"
git config --global user.name "conda-forge-curator[bot]"
git config --global pull.rebase false
python update_repodata_patches.py
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}