diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 809a3f6..0842976 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,4 +5,4 @@ updates: schedule: interval: daily time: "10:00" - open-pull-requests-limit: 0 # only allow security update + open-pull-requests-limit: 50 # only allow security update diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index f3641b8..4bc0405 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -39,7 +39,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -50,7 +50,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v2 + uses: github/codeql-action/autobuild@v3 # ℹī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d7a812c..747aa1a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,16 +23,19 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - name: install node v14 - uses: actions/setup-node@v1 + - uses: actions/checkout@v4 + - name: install Current node version + uses: actions/setup-node@v4 with: - node-version: 14 + node-version: 'current' + registry-url: ${{ secrets.NPM_REGISTRY }} - name: npm install run: npm ci - - name: Build + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Build Typescript run: npm run build - - name: Test + - name: Run Unit tests run: npm run test - name: buildkite/plugin-linter run: make linter diff --git a/Dockerfile b/Dockerfile index 85340b8..34c4a21 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ ARG DOCKER_CACHE -FROM ${DOCKER_CACHE}node:14-alpine +FROM ${DOCKER_CACHE}node:20-alpine ADD . /app diff --git a/docker-compose.yml b/docker-compose.yml index 4835783..c561cfd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,11 @@ version: "3" services: slack-notification: - image: slack-notification:build-${BUILDKITE_BUILD_NUMBER} + build: + context: . + dockerfile: Dockerfile + args: + - DOCKER_CACHE environment: SLACK_TOKEN: ${TOKEN_VALUE} SLACK_CHANNEL: ${BUILDKITE_PLUGIN_JUNIT_SLACK_NOTIFICATION_SLACK_CHANNEL} diff --git a/makefile b/makefile index df97e22..9587dc4 100644 --- a/makefile +++ b/makefile @@ -6,12 +6,6 @@ IMAGE_NAME ?= slack-notification BUILDKITE_PLUGIN_JUNIT_SLACK_NOTIFICATION_DOCKER_CACHE ?= -test: build run - -build: - echo building $(IMAGE_NAME):build-${BUILDKITE_BUILD_NUMBER} - docker build --tag=$(IMAGE_NAME):build-${BUILDKITE_BUILD_NUMBER} --build-arg DOCKER_CACHE=${BUILDKITE_PLUGIN_JUNIT_SLACK_NOTIFICATION_DOCKER_CACHE} . - run: docker-compose run --rm slack-notification