-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove yq dependency from workflow setup
- Remove redundant "Install yq" step from the workflow. Related to #315
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
///usr/bin/env jbang "$0" "$@" ; exit $? | ||
|
||
import java.nio.charset.StandardCharsets; | ||
import java.nio.file.Files; | ||
import java.nio.file.Path; | ||
import java.util.List; | ||
import java.util.OptionalInt; | ||
import java.util.stream.IntStream; | ||
|
||
/** | ||
* Remove the Install YQ step from the quarkus-snapshot.yaml workflow and update actions | ||
*/ | ||
public class RemoveYq { | ||
|
||
public static void main(String... args) throws Exception { | ||
Path workflowFile = Path.of(".github/workflows/quarkus-snapshot.yaml"); | ||
if (Files.exists(workflowFile)) { | ||
String fileContents = Files.readString(workflowFile, StandardCharsets.UTF_8); | ||
fileContents = fileContents.replace(""" | ||
- name: Install yq | ||
run: sudo add-apt-repository ppa:rmescandon/yq && sudo apt update && sudo apt install yq -y | ||
""", ""); | ||
Files.writeString(workflowFile, fileContents); | ||
} | ||
} | ||
|
||
} |