From bc0351279a5a870734d042019dbacc97064eea79 Mon Sep 17 00:00:00 2001
From: Sthope <sthope@noreply@SthopeGit>
Date: Mon, 28 Aug 2023 18:43:19 +0200
Subject: [PATCH] Update .drone.yml

---
 .drone.yml | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/.drone.yml b/.drone.yml
index 6d20cde..ebc6769 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -3,7 +3,9 @@ name: release
 
 steps:
   - name: create-script-file
-    image: alpine:3.13
+    image: node:14
+    environment:
+      TARGET_RELEASE_TAG: '2023-02-13-1223'
     commands:
       - echo "const axios = require('axios');" > custom-script.js
       - echo "" >> custom-script.js
@@ -18,7 +20,7 @@ steps:
       - echo "}" >> custom-script.js
       - echo "" >> custom-script.js
       - echo "getLatestReleaseTag().then((latestReleaseTag) => {" >> custom-script.js
-      - echo "  const targetReleaseTag = '2023-02-13-1223';" >> custom-script.js
+      - echo "  const targetReleaseTag = process.env.TARGET_RELEASE_TAG;" >> custom-script.js
       - echo "" >> custom-script.js
       - echo "  if (latestReleaseTag > targetReleaseTag) {" >> custom-script.js
       - echo "    console.log('This pipeline is run because the new release is newer than the one I have.');" >> custom-script.js
@@ -28,8 +30,3 @@ steps:
       - echo "    console.log('The new release is older than the one I have.');" >> custom-script.js
       - echo "}" >> custom-script.js
       - echo "" >> custom-script.js
-
-  - name: run
-    image: node:14
-    commands:
-      - node custom-script.js