diff --git a/dist/restore/index.js b/dist/restore/index.js
index bf3053d..7a04776 100644
--- a/dist/restore/index.js
+++ b/dist/restore/index.js
@@ -36963,8 +36963,9 @@ function getInputAsArray(name, options) {
     return core
         .getInput(name, options)
         .split("\n")
-        .map(s => s.trim())
-        .filter(x => x !== "");
+        .map(s => s.replace(/^\!\s+/, '!').trim())
+        .filter(x => x !== "")
+        .sort();
 }
 exports.getInputAsArray = getInputAsArray;
 function getInputAsInt(name, options) {
diff --git a/dist/save/index.js b/dist/save/index.js
index 80a93af..1d3b077 100644
--- a/dist/save/index.js
+++ b/dist/save/index.js
@@ -36963,8 +36963,9 @@ function getInputAsArray(name, options) {
     return core
         .getInput(name, options)
         .split("\n")
-        .map(s => s.trim())
-        .filter(x => x !== "");
+        .map(s => s.replace(/^\!\s+/, '!').trim())
+        .filter(x => x !== "")
+        .sort();
 }
 exports.getInputAsArray = getInputAsArray;
 function getInputAsInt(name, options) {