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