diff --git a/README.md b/README.md index 8f12716..cff31d5 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ jobs: server-name: "gh-actions-server" server-type: "cx11" server-location: "nbg1" - image-name: "ubuntu-20.04" + image-identifier: "ubuntu-20.04" ssh-key-name: "my key name" hcloud-token: ${{ secrets.HCLOUD_TOKEN }} ``` @@ -152,7 +152,7 @@ jobs: server-name: "gh-actions-server" server-type: "cx11" server-location: "nbg1" - image-name: "ubuntu-20.04" + image-identifier: "ubuntu-20.04" ssh-key-name: "my key name" hcloud-token: ${{ secrets.HCLOUD_TOKEN }} - uses: webfactory/ssh-agent@v0.4.1 @@ -191,7 +191,7 @@ jobs: server-name: "server" server-type: "cx11" server-location: "nbg1" - image-name: "ubuntu-20.04" + image-identifier: "ubuntu-20.04" ssh-key-name: "my key name" hcloud-token: ${{ secrets.HCLOUD_TOKEN }} startup-timeout: 40000 diff --git a/action.yml b/action.yml index 335dca8..b50aed5 100644 --- a/action.yml +++ b/action.yml @@ -12,8 +12,8 @@ inputs: server-location: description: "The Hetzner server location (nbg1|...) you want your server to be." required: true - image-name: - description: "The name of the Operating System image your server should be initiated with." + image-identifier: + description: "The name or ID of the Operating System image your server should be initiated with." required: true image-type: description: "The type (system|snapshot|backup|app) of the Operating System image your server should be initiated with." diff --git a/dist/clean/index.js b/dist/clean/index.js index 97dc37c..f509c39 100644 --- a/dist/clean/index.js +++ b/dist/clean/index.js @@ -44,7 +44,7 @@ const options = { type: core.getInput("server-type"), }, image: { - name: core.getInput("image-name"), + name: core.getInput("image-identifier"), type: core.getInput("image-type"), }, sshKeyName: core.getInput("ssh-key-name"), diff --git a/dist/deploy/index.js b/dist/deploy/index.js index 8c5c9c5..0496137 100644 --- a/dist/deploy/index.js +++ b/dist/deploy/index.js @@ -50,7 +50,7 @@ module.exports = /******/ (() => { type: core.getInput("server-type"), }, image: { - name: core.getInput("image-name"), + name: core.getInput("image-identifier"), type: core.getInput("image-type"), }, sshKeyName: core.getInput("ssh-key-name"), diff --git a/lib.js b/lib.js index b294ce5..5f24f68 100644 --- a/lib.js +++ b/lib.js @@ -15,7 +15,7 @@ const options = { type: core.getInput("server-type"), }, image: { - name: core.getInput("image-name"), + name: core.getInput("image-identifier"), type: core.getInput("image-type"), }, sshKeyName: core.getInput("ssh-key-name"), diff --git a/test/index_test.js b/test/index_test.js index a5ed5f5..28b229f 100644 --- a/test/index_test.js +++ b/test/index_test.js @@ -56,7 +56,7 @@ test("if a request creates a server on Hetzner Cloud", async (t) => { return options.server.type; case "server-location": return options.server.location; - case "image-name": + case "image-identifier": return options.image.name; case "image-type": return options.image.type; @@ -126,7 +126,7 @@ test("if a server can be deleted in cleanup ", async (t) => { return options.server.type; case "server-location": return options.server.location; - case "image-name": + case "image-identifier": return options.image.name; case "image-type": return options.image.type; @@ -187,7 +187,7 @@ test("if a server is kept when delete-server input is set to false", async (t) = return options.server.type; case "server-location": return options.server.location; - case "image-name": + case "image-identifier": return options.image.name; case "image-type": return options.image.type; @@ -558,7 +558,7 @@ test("if a request creates a server on Hetzner Cloud from snapshot", async (t) = return options.server.type; case "server-location": return options.server.location; - case "image-name": + case "image-identifier": return options.image.name; case "image-type": return options.image.type;