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
32 changes: 4 additions & 28 deletions .github/index.pkl
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ amends "@pkl.impl.ghactions/PklCI.pkl"
import "@com.github.actions/catalog.pkl"
import "@com.github.actions/context.pkl"
import "@com.github.actions/Workflow.pkl"
import "@pkl.impl.ghactions/jobs/HawkeyeCheck.pkl"

build = buildAndTest

Expand Down Expand Up @@ -49,7 +50,8 @@ local baseJob: Workflow.Job = new {
}
new {
name = "Check Code Generation"
run = """
run =
"""
npm run generate
git diff --name-only --exit-code
"""
Expand All @@ -61,35 +63,9 @@ local baseJob: Workflow.Job = new {
}
}

local testLicenses: Workflow.Job = new {
name = "Test license headers"
`runs-on` = "ubuntu-latest"
steps {
(catalog.`actions/checkout@v6`) {
with {
`fetch-depth` = 0
}
}
new {
name = "Install hawkeye"
// language=bash
run =
"""
curl -L -o hawkeye.tar.xz https://github.com/korandoru/hawkeye/releases/download/v6.3.0/hawkeye-x86_64-unknown-linux-gnu.tar.xz
tar xf hawkeye.tar.xz
cp hawkeye-x86_64-unknown-linux-gnu/hawkeye .
"""
}
new {
name = "Check licenses"
run = "./hawkeye check --fail-if-unknown"
}
}
}

local buildAndTest: Workflow = new {
jobs {
["test-licenses"] = testLicenses
["test-licenses"] = new HawkeyeCheck {}.job
["build-and-test"] = (baseJob) {
name = "Build and test"
}
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,18 @@ permissions:
contents: read
jobs:
test-licenses:
name: Test license headers
name: hawkeye-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || '' }}
persist-credentials: false
fetch-depth: 0
- name: Install hawkeye
run: |-
curl -L -o hawkeye.tar.xz https://github.com/korandoru/hawkeye/releases/download/v6.3.0/hawkeye-x86_64-unknown-linux-gnu.tar.xz
tar xf hawkeye.tar.xz
cp hawkeye-x86_64-unknown-linux-gnu/hawkeye .
- name: Check licenses
run: ./hawkeye check --fail-if-unknown
- run: git config --global --add safe.directory $(pwd)
- run: hawkeye check --config licenserc.toml --fail-if-unknown
container:
image: ghcr.io/korandoru/hawkeye@sha256:e0abf8dbfaeeeba1249679d662d9fb404b1dcdb041c6093ea1f7a6edb7d89319
build-and-test:
name: Build and test
runs-on: ubuntu-latest
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,18 @@ permissions:
contents: read
jobs:
test-licenses:
name: Test license headers
name: hawkeye-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || '' }}
persist-credentials: false
fetch-depth: 0
- name: Install hawkeye
run: |-
curl -L -o hawkeye.tar.xz https://github.com/korandoru/hawkeye/releases/download/v6.3.0/hawkeye-x86_64-unknown-linux-gnu.tar.xz
tar xf hawkeye.tar.xz
cp hawkeye-x86_64-unknown-linux-gnu/hawkeye .
- name: Check licenses
run: ./hawkeye check --fail-if-unknown
- run: git config --global --add safe.directory $(pwd)
- run: hawkeye check --config licenserc.toml --fail-if-unknown
container:
image: ghcr.io/korandoru/hawkeye@sha256:e0abf8dbfaeeeba1249679d662d9fb404b1dcdb041c6093ea1f7a6edb7d89319
build-and-test:
name: Build and test
runs-on: ubuntu-latest
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/prb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,18 @@ permissions:
contents: read
jobs:
test-licenses:
name: Test license headers
name: hawkeye-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || '' }}
persist-credentials: false
fetch-depth: 0
- name: Install hawkeye
run: |-
curl -L -o hawkeye.tar.xz https://github.com/korandoru/hawkeye/releases/download/v6.3.0/hawkeye-x86_64-unknown-linux-gnu.tar.xz
tar xf hawkeye.tar.xz
cp hawkeye-x86_64-unknown-linux-gnu/hawkeye .
- name: Check licenses
run: ./hawkeye check --fail-if-unknown
- run: git config --global --add safe.directory $(pwd)
- run: hawkeye check --config licenserc.toml --fail-if-unknown
container:
image: ghcr.io/korandoru/hawkeye@sha256:e0abf8dbfaeeeba1249679d662d9fb404b1dcdb041c6093ea1f7a6edb7d89319
build-and-test:
name: Build and test
runs-on: ubuntu-latest
Expand Down
Loading