Skip to content

Commit a44f884

Browse files
authored
Merge pull request #21 from rhart/switch-to-action
Switch to action
2 parents e2a6579 + e030a44 commit a44f884

File tree

14 files changed

+330
-467
lines changed

14 files changed

+330
-467
lines changed

.github/copilot-instructions.md

Lines changed: 0 additions & 234 deletions
This file was deleted.

.github/workflows/openrewrite-examples-run.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/openrewrite-workflow.yml

Lines changed: 0 additions & 87 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Test OpenRewrite Runner
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
recipes:
7+
description: 'Comma-separated list of recipe names'
8+
required: true
9+
default: 'com.example.FixKubernetesManifests'
10+
recipe-parameters:
11+
description: 'Recipe parameters (recipeName.paramName=value)'
12+
required: false
13+
default: 'com.example.FixKubernetesManifests.targetDirectory=examples/yaml/project-*'
14+
15+
jobs:
16+
test-action:
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: write
20+
pull-requests: write
21+
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
28+
- name: Run OpenRewrite
29+
id: openrewrite
30+
uses: ./
31+
with:
32+
recipes: ${{ github.event.inputs.recipes }}
33+
recipe-parameters: ${{ github.event.inputs.recipe-parameters }}
34+
recipes-dir: "examples/recipes"
35+
rewrite-dependencies: "org.openrewrite:rewrite-yaml:8.66.3"
36+
37+
- name: Show results
38+
run: |
39+
echo "Changes detected: ${{ steps.openrewrite.outputs.changes-detected }}"
40+
echo "Activated recipes: ${{ steps.openrewrite.outputs.activated-recipes }}"
41+
if [[ "${{ steps.openrewrite.outputs.changes-detected }}" == "true" ]]; then
42+
echo "Files changed:"
43+
git status --short
44+
fi

0 commit comments

Comments
 (0)