Skip to content

Commit ab2e535

Browse files
committed
Fix build jobs
Signed-off-by: John Mertic <[email protected]>
1 parent 6a7f389 commit ab2e535

File tree

3 files changed

+68
-1
lines changed

3 files changed

+68
-1
lines changed

.github/workflows/build.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ jobs:
99
build:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: jmertic/lfx-landscape-tools@e5ca86c5671c026b6c4d2ddc518d4a6a66db1942 # 20240124
12+
- uses: jmertic/lfx-landscape-tools@main
13+
with:
14+
project_processing: skip
1315
env:
1416
token: ${{ secrets.PAT }}
1517
repository: ${{ github.repository }}

.github/workflows/preview.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Preview
2+
3+
permissions:
4+
pull-requests: write
5+
6+
on:
7+
pull_request_target:
8+
branches:
9+
- main
10+
- master
11+
paths:
12+
- 'landscape.yml'
13+
- 'hosted_logos/*'
14+
types:
15+
- opened
16+
17+
jobs:
18+
comment:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
22+
env:
23+
LANDSCAPE_URL: 'https://landscape.graphql.org'
24+
DATA_FILE: 'landscape.yml'
25+
LOGOS_PATH: 'hosted_logos'
26+
OWNER: ${{ github.event.pull_request.head.repo.owner.login }}
27+
REPO: ${{ github.event.pull_request.head.repo.name }}
28+
REF: ${{ github.event.pull_request.head.ref }}
29+
with:
30+
script: |
31+
const { LANDSCAPE_URL, DATA_FILE, LOGOS_PATH, OWNER, REPO, REF } = process.env
32+
const comment = `You can preview your changes by [visiting this link](${LANDSCAPE_URL}/?overlay-data=https://raw.githubusercontent.com/${OWNER}/${REPO}/${REF}/${DATA_FILE}&overlay-logos=https://raw.githubusercontent.com/${OWNER}/${REPO}/${REF}/${LOGOS_PATH}).\n\n> [!NOTE]\n > This feature is still experimental and may not work as expected in some cases. Please report any issues you find!`
33+
34+
github.rest.issues.createComment({
35+
issue_number: context.issue.number,
36+
owner: context.repo.owner,
37+
repo: context.repo.repo,
38+
body: comment
39+
})

.github/workflows/validate.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Validate
2+
3+
on:
4+
merge_group:
5+
pull_request:
6+
branches:
7+
- main
8+
- master
9+
10+
jobs:
11+
validate-landscape:
12+
runs-on: ubuntu-latest
13+
name: "Validate landscape.yml file"
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: cncf/landscape2-validate-action@v2
17+
with:
18+
target_kind: data
19+
target_path: ./landscape.yml
20+
- uses: pascalgn/[email protected]
21+
if: success()
22+
env:
23+
GITHUB_TOKEN: "${{ secrets.PAT }}"
24+
MERGE_LABELS: "automated-build"
25+
MERGE_RETRY_SLEEP: 300000
26+
MERGE_METHOD: "squash"

0 commit comments

Comments
 (0)