From 3ed57b75f4ab113e08dc29f870aea7b79b1959ab Mon Sep 17 00:00:00 2001 From: Kevin Midboe Date: Wed, 2 Nov 2022 21:48:58 +0100 Subject: [PATCH] Drone lint, build and publish definitions --- .drone.yml | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..a75e53f --- /dev/null +++ b/.drone.yml @@ -0,0 +1,76 @@ +--- +kind: pipeline +type: docker +name: figlet-http build + +platform: + os: linux + arch: amd64 + +volumes: + - name: cache + host: + path: /tmp/cache + +steps: + - name: Load cached node_modules packages + image: sinlead/drone-cache:1.0.0 + settings: + action: load + key: yarn.lock + mount: node_modules + prefix: yarn-modules-figlet-http + volumes: + - name: cache + path: /cache + + - name: Install + image: node:18.2.0 + commands: + - node -v + - yarn --version + - yarn + + - name: Cache node_modules packages + image: sinlead/drone-cache:1.0.0 + settings: + action: save + key: yarn.lock + mount: node_modules + prefix: yarn-modules-figlet-http + volumes: + - name: cache + path: /cache + + - name: Build ts + image: node:18.2.0 + commands: + - yarn build + + - name: Lint project using eslint + image: node:18.2.0 + commands: + - yarn lint + failure: ignore + + - name: Build and publish docker image + image: plugins/docker + settings: + registry: ghcr.io + repo: ghcr.io/kevinmidboe/figlet-http + dockerfile: Dockerfile + username: + from_secret: GITHUB_USERNAME + password: + from_secret: GITHUB_PASSWORD + tags: latest + when: + event: + - push + branch: + - master + +trigger: + event: + include: + - push