Compile python requirements #132
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: ./admin/ops/python_compile_requirements.sh | |
- name: Create PR | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
commit-message: automated compiling of python requirements | |
add-paths: admin/run_environment | |
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 |