Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Automerge PRs from LFX Landscape Tools

on:
workflow_dispatch:
schedule:
- cron: "45 4 * * *"

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Automerge PR if label is set to `automated-build`
uses: pascalgn/automerge-action@7961b8b5eec56cc088c140b56d864285eabd3f67 # v0.16.4
env:
MERGE_LABELS: "automated-build"
MERGE_RETRY_SLEEP: 300000
MERGE_METHOD: "squash"
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
39 changes: 39 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Preview

permissions:
pull-requests: write

on:
pull_request_target:
branches:
- main
- master
paths:
- 'landscape.yml'
- 'hosted_logos/*'
types:
- opened

jobs:
comment:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
env:
LANDSCAPE_URL: 'https://landscape.aousd.org'
DATA_FILE: 'landscape.yml'
LOGOS_PATH: 'hosted_logos'
OWNER: ${{ github.event.pull_request.head.repo.owner.login }}
REPO: ${{ github.event.pull_request.head.repo.name }}
REF: ${{ github.event.pull_request.head.ref }}
with:
script: |
const { LANDSCAPE_URL, DATA_FILE, LOGOS_PATH, OWNER, REPO, REF } = process.env
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!`

github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment
})
17 changes: 7 additions & 10 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
name: Validate
name: Validate Landscape

on:
merge_group:
pull_request_target:
branches:
- main
- master
pull_request:
branches:
- main
Expand All @@ -12,15 +16,8 @@ jobs:
runs-on: ubuntu-latest
name: "Validate landscape.yml file"
steps:
- uses: actions/checkout@v4
- uses: cncf/landscape2-validate-action@v2
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: cncf/landscape2-validate-action@6381e8747c73412e638670807b402ef2b863e9f8 # v2.0.1
with:
target_kind: data
target_path: ./landscape.yml
- uses: pascalgn/[email protected]
if: success()
env:
GITHUB_TOKEN: "${{ secrets.PAT }}"
MERGE_LABELS: "automated-build"
MERGE_RETRY_SLEEP: 300000
MERGE_METHOD: "squash"