Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ updates:
interval: "weekly"
target-branch: "development"
reviewers:
- "splitio/sdk"
- "splitio/sdk"
30 changes: 0 additions & 30 deletions .github/workflows/cd.yml

This file was deleted.

55 changes: 0 additions & 55 deletions .github/workflows/ci.yml

This file was deleted.

78 changes: 78 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: docker

on:
push:
branches:
- master
pull_request:
branches:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'push' && github.run_number || github.event.pull_request.number }}
cancel-in-progress: true

jobs:
docker:
name: Build Docker image
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: amd64,arm64

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Artifactory
if: ${{ github.event_name == 'push' }}
uses: docker/login-action@v3
with:
registry: splitio-docker-dev.jfrog.io
username: ${{ secrets.ARTIFACTORY_DOCKER_USER }}
password: ${{ secrets.ARTIFACTORY_DOCKER_PASS }}

- name: Create build version
run: echo "BUILD_VERSION=$(cat package.json | grep version | head -1 | awk '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]')" >> $GITHUB_ENV

- name: Docker build
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name == 'push' }}
platforms: linux/amd64,linux/arm64
tags: splitio-docker-dev.jfrog.io/${{ github.event.repository.name }}:${{ env.BUILD_VERSION}},splitio-docker-dev.jfrog.io/${{ github.event.repository.name }}:latest

lacework:
name: Scan Docker image
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Create build version
run: echo "BUILD_VERSION=$(cat package.json | grep version | head -1 | awk '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]')" >> $GITHUB_ENV

- name: Docker build
uses: docker/build-push-action@v5
with:
context: .
push: false
tags: splitio-docker-dev.jfrog.io/${{ github.event.repository.name }}:${{ env.BUILD_VERSION}}
build-args: |
ARTIFACTORY_USER=${{ secrets.ARTIFACTORY_USER }}
ARTIFACTORY_TOKEN=${{ secrets.ARTIFACTORY_TOKEN }}

- name: Scan container using Lacework
uses: lacework/lw-scanner-action@v1.4.1
with:
LW_ACCOUNT_NAME: ${{ secrets.LW_ACCOUNT_NAME }}
LW_ACCESS_TOKEN: ${{ secrets.LW_ACCESS_TOKEN }}
IMAGE_NAME: splitio-docker-dev.jfrog.io/${{ github.event.repository.name }}
IMAGE_TAG: ${{ env.BUILD_VERSION}}
SAVE_RESULTS_IN_LACEWORK: true
23 changes: 23 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: test

on:
pull_request:
branches-ignore:
- none

jobs:
build-and-test:
name: Build and test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 18.18.0

- run: npm ci
- run: npm run lint
- run: npm run test
11 changes: 9 additions & 2 deletions .github/workflows/unstable.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: unstable

on:
push:
branches-ignore:
Expand All @@ -19,8 +20,13 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Create build version
run: echo "BUILD_VERSION=$(cat package.json | grep version | head -1 | awk '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]')" >> $GITHUB_ENV
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: amd64,arm64

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Get short hash
run: echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
Expand All @@ -30,4 +36,5 @@ jobs:
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: splitio-docker-dev.jfrog.io/${{ github.event.repository.name }}:${{ env.SHORT_SHA}}