-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaction.yml
106 lines (105 loc) · 4 KB
/
action.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: Update Landscape from LFX
description: Update the given landscape from LFx
inputs:
project_processing:
description: "Indicate for project processing, if they should be 'rebuild' or 'sync' ( or 'skip' to not build projects )"
default: "sync"
runs:
using: composite
steps:
- name: Install cairo
uses: awalsh128/cache-apt-pkgs-action@a6c3917cc929dd0345bfb2d3feaf9101823370ad # v1.4.2
with:
packages: libcairo2-dev
version: 1.0
- name: Checkout landscape
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.1.7@v4
with:
token: ${{ env.token }}
repository: ${{ env.repository }}
ref: ${{ env.ref }}
path: landscape
- name: Checkout landscape-tools
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.1.7@v4
with:
token: ${{ env.token }}
repository: jmertic/lfx-landscape-tools
path: landscape-tools
- name: Set up Python 3.x
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: '3.x'
- name: Install poetry
uses: abatilo/actions-poetry@3765cf608f2d4a72178a9fc5b918668e542b89b1 # v4.0.0
- name: Install dependencies
shell: bash
working-directory: ./landscape-tools
run: poetry install
- name: Build members from LFX
working-directory: ./landscape-tools
shell: bash
run: poetry run lfx_landscape build_members -c ../landscape/config.yml
env:
GITHUB_TOKEN: ${{ env.token }}
GH_TOKEN: ${{ env.token }}
- name: Rebuild projects from LFX and other sources
if: ${{ inputs.project_processing == 'rebuild' }}
working-directory: ./landscape-tools
shell: bash
run: poetry run lfx_landscape build_projects -c ../landscape/config.yml
env:
GITHUB_TOKEN: ${{ env.token }}
GH_TOKEN: ${{ env.token }}
- name: Sync projects from LFX and other sources
if: ${{ inputs.project_processing == 'sync' }}
working-directory: ./landscape-tools
shell: bash
run: poetry run lfx_landscape sync_projects -c ../landscape/config.yml
env:
GITHUB_TOKEN: ${{ env.token }}
GH_TOKEN: ${{ env.token }}
- name: Save missing.csv file
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
name: missing-members
path: ./landscape/missing.csv
- name: Validate landscape2 data
uses: cncf/landscape2-validate-action@7f299c46e9b03b4e8bc2896882734fb0b0756b37 # v2.0.0
with:
target_kind: data
target_path: ./landscape/landscape.yml
- name: Checkout landscapeapp
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.1.7@v4
if: ${{ hashFiles('./landscape/settings.yml') != '' }}
with:
repository: cncf/landscapeapp
path: landscapeapp
- name: Setup node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
if: ${{ hashFiles('./landscape/settings.yml') != '' }}
with:
node-version: '18'
- name: Cleanup YAML files
if: ${{ hashFiles('./landscape/settings.yml') != '' }}
working-directory: ./landscapeapp
shell: bash
run: |
node tools/removePuppeteer
npm install
PROJECT_PATH=../landscape node tools/removeQuotes
PROJECT_PATH=../landscape node tools/pruneExtraEntries
- name: Get current date
id: date
uses: Kaven-Universe/github-action-current-date-time@f2c12d90cff9c3e7b1f50430886e632fe31fcee1 # v1.4.0
with:
format: "YYYY-MM-DD"
- name: Create Pull Request
uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7.0.6
with:
token: ${{ env.token }}
branch-suffix: timestamp
path: ./landscape
title: "Update Landscape from LFX ${{ steps.date.outputs.time }}"
labels: automated-build
commit-message: Update Landscape from LFX
signoff: true