Skip to content

Commit

Permalink
Remove yq dependency from workflow setup
Browse files Browse the repository at this point in the history
- Remove redundant "Install yq" step from the workflow.

Related to #315
  • Loading branch information
gastaldi committed Jan 9, 2025
1 parent 538868f commit 1867470
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions patches/RemoveYq.java
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);
}
}

}

0 comments on commit 1867470

Please sign in to comment.