Build Landscape from LFX #1333
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: Update members | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 4 * * *' | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 | |
with: | |
egress-policy: audit | |
- name: Checkout lf-landscape | |
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | |
with: | |
path: landscape | |
- name: Checkout landscape-tools | |
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | |
with: | |
repository: jmertic/landscape-tools | |
path: landscape-tools | |
- name: Set up Python 3.x | |
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
pip install --no-deps --require-hashes -r landscape-tools/requirements.txt | |
- name: Run build | |
working-directory: ./landscape | |
run: | | |
../landscape-tools/landscapemembers.py | |
cp images/red-hat-inc.svg hosted_logos/red_hat_inc.svg | |
- name: Save missing.csv file | |
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | |
with: | |
name: missing-members | |
path: ./landscape/missing.csv | |
- name: Checkout landscapeapp | |
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | |
with: | |
repository: cncf/landscapeapp | |
path: landscapeapp | |
- name: Setup node | |
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2 | |
with: | |
node-version: '18' | |
- name: Cleanup YAML files | |
working-directory: ./landscapeapp | |
run: | | |
node tools/removePuppeteer | |
npm install | |
PROJECT_PATH=../landscape node tools/removeQuotes | |
PROJECT_PATH=../landscape node tools/pruneExtraEntries | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e # v6.0.5 | |
with: | |
token: ${{ secrets.PAT }} | |
branch-suffix: timestamp | |
path: ./landscape | |
title: Daily update | |
labels: daily-update | |
commit-message: Daily update | |
- name: Send missing.csv to memberops | |
uses: dawidd6/action-send-mail@2cea9617b09d79a095af21254fbcb7ae95903dde # v3.12.0 | |
with: | |
server_address: smtp.gmail.com | |
server_port: 465 | |
secure: true | |
username: ${{secrets.MAIL_USERNAME}} | |
password: ${{secrets.MAIL_PASSWORD}} | |
subject: missing.csv from daily landscape build | |
to: memberops@linuxfoundation.org | |
from: LF Landscape | |
body: See attached | |
cc: jmertic@linuxfoundation.org | |
reply_to: jmertic@linuxfoundation.org | |
ignore_cert: true | |
convert_markdown: true | |
attachments: ./landscape/missing.csv | |
priority: low |