-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (46 loc) · 1.6 KB
/
python_compile_requirements.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
name: Compile python requirements
on:
schedule:
- cron: 0 17 * * SAT
workflow_dispatch:
jobs:
compile_requirements:
name: Compile requirements and commit changes
runs-on: ubuntu-22.04
container:
image: nycplanning/base:latest
defaults:
run:
shell: bash
steps:
- name: Install git
run: apt-get update && apt-get -y install git
- uses: actions/checkout@v4
- name: Compile requirements
run: ./bash/compile_python_packages.sh
- name: Create PR
uses: peter-evans/create-pull-request@v5
with:
commit-message: automated compiling of python requirements
add-paths: python/
title: Compile python requirements
author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
assignees: ${{ github.event_name == 'schedule' && 'fvankrieken, damonmcc, alexrichey, sf-dcp' || '' }}
branch: compile_python_reqs
token: ${{ secrets.GHP_TOKEN }}
create_issue_on_failure:
needs: compile_requirements
runs-on: ubuntu-22.04
if: ${{ failure() && (github.event_name == 'schedule') }}
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: .github
- name: Create issue on failure
uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ACTION: ${{ github.workflow }}
BUILD_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
with:
filename: .github/ISSUE_TEMPLATE/scheduled_action_failure.md