diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..8f23771 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,20 @@ +--- +name: Build + +"on": push + +jobs: + build: + name: Build + + runs-on: ubuntu-latest + + steps: + - name: BuildX + uses: docker/setup-buildx-action@v2 + + - name: Build + uses: docker/build-push-action@v4 + with: + no-cache: true + platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f840ca5..18e088a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -18,5 +18,8 @@ jobs: npm install npm run dist + - name: Lint Dockerfile + run: docker run --rm -i hadolint/hadolint:2.12.0 < Dockerfile + - name: Check if build left artifacts run: git diff --exit-code diff --git a/Dockerfile b/Dockerfile index aad533e..99ceb6b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,16 @@ FROM graphiteapp/graphite-statsd:1.1.10-4 -ARG VSN=1.0.2 +ARG VSN=1.0.3 WORKDIR /etc/service/dogstatsd-2-statsd # Read /entrypoint to understand why we use run and /etc/service RUN set -ex \ && sed -i 's/8125/8135/g' /opt/statsd/config/udp.js \ - && apk add npm git \ + && apk add --no-cache npm=8.1.3-r0 git=2.34.7-r0 \ && git clone --depth 1 --branch $VSN https://github.com/paulo-ferraz-oliveira/dogstatsd-2-statsd.git . \ && npm install --omit=dev \ - && echo -e "#!/bin/bash\n\nexec node index.js" > run \ + && printf "#!/bin/bash\n\nexec node index.js" > run \ && chmod +x run -ENTRYPOINT /entrypoint +ENTRYPOINT ["/entrypoint"] diff --git a/VERSION b/VERSION index 6d7de6e..21e8796 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.2 +1.0.3 diff --git a/package-lock.json b/package-lock.json index ebe467b..ba4bd66 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "dogstatsd-2-statsd", - "version": "1.0.2", + "version": "1.0.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "dogstatsd-2-statsd", - "version": "1.0.2", + "version": "1.0.3", "license": "MIT", "devDependencies": { "eslint": "8.35.0", diff --git a/package.json b/package.json index c0ce218..0cc23c3 100644 --- a/package.json +++ b/package.json @@ -26,5 +26,5 @@ "yaml-lint": "node_modules/.bin/yamllint -c .yaml-lint.yml .github/**/*.yml .*.yml *.yml" }, "type": "module", - "version": "1.0.2" + "version": "1.0.3" }