Skip to content

Commit 4b4c0fa

Browse files
authored
Merge pull request #182 from splitio/master
update development
2 parents 303e95f + b36fc7f commit 4b4c0fa

6 files changed

Lines changed: 111 additions & 88 deletions

File tree

.github/dependabot.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ updates:
88
interval: "weekly"
99
target-branch: "development"
1010
reviewers:
11-
- "splitio/sdk"
11+
- "splitio/sdk"

.github/workflows/cd.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 0 additions & 55 deletions
This file was deleted.

.github/workflows/docker.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: docker
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.event_name == 'push' && github.run_number || github.event.pull_request.number }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
docker:
17+
name: Build Docker image
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v4
22+
23+
- name: Setup QEMU
24+
uses: docker/setup-qemu-action@v3
25+
with:
26+
platforms: amd64,arm64
27+
28+
- name: Set up Docker Buildx
29+
uses: docker/setup-buildx-action@v3
30+
31+
- name: Login to Artifactory
32+
if: ${{ github.event_name == 'push' }}
33+
uses: docker/login-action@v3
34+
with:
35+
registry: splitio-docker-dev.jfrog.io
36+
username: ${{ secrets.ARTIFACTORY_DOCKER_USER }}
37+
password: ${{ secrets.ARTIFACTORY_DOCKER_PASS }}
38+
39+
- name: Create build version
40+
run: echo "BUILD_VERSION=$(cat package.json | grep version | head -1 | awk '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]')" >> $GITHUB_ENV
41+
42+
- name: Docker build
43+
uses: docker/build-push-action@v5
44+
with:
45+
context: .
46+
push: ${{ github.event_name == 'push' }}
47+
platforms: linux/amd64,linux/arm64
48+
tags: splitio-docker-dev.jfrog.io/${{ github.event.repository.name }}:${{ env.BUILD_VERSION}},splitio-docker-dev.jfrog.io/${{ github.event.repository.name }}:latest
49+
50+
lacework:
51+
name: Scan Docker image
52+
if: ${{ github.event_name == 'pull_request' }}
53+
runs-on: ubuntu-latest
54+
steps:
55+
- name: Checkout code
56+
uses: actions/checkout@v4
57+
58+
- name: Create build version
59+
run: echo "BUILD_VERSION=$(cat package.json | grep version | head -1 | awk '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]')" >> $GITHUB_ENV
60+
61+
- name: Docker build
62+
uses: docker/build-push-action@v5
63+
with:
64+
context: .
65+
push: false
66+
tags: splitio-docker-dev.jfrog.io/${{ github.event.repository.name }}:${{ env.BUILD_VERSION}}
67+
build-args: |
68+
ARTIFACTORY_USER=${{ secrets.ARTIFACTORY_USER }}
69+
ARTIFACTORY_TOKEN=${{ secrets.ARTIFACTORY_TOKEN }}
70+
71+
- name: Scan container using Lacework
72+
uses: lacework/lw-scanner-action@v1.4.1
73+
with:
74+
LW_ACCOUNT_NAME: ${{ secrets.LW_ACCOUNT_NAME }}
75+
LW_ACCESS_TOKEN: ${{ secrets.LW_ACCESS_TOKEN }}
76+
IMAGE_NAME: splitio-docker-dev.jfrog.io/${{ github.event.repository.name }}
77+
IMAGE_TAG: ${{ env.BUILD_VERSION}}
78+
SAVE_RESULTS_IN_LACEWORK: true

.github/workflows/test.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: test
2+
3+
on:
4+
pull_request:
5+
branches-ignore:
6+
- none
7+
8+
jobs:
9+
build-and-test:
10+
name: Build and test
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Install Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 18.18.0
20+
21+
- run: npm ci
22+
- run: npm run lint
23+
- run: npm run test

.github/workflows/unstable.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: unstable
2+
23
on:
34
push:
45
branches-ignore:
@@ -19,8 +20,13 @@ jobs:
1920
- name: Checkout code
2021
uses: actions/checkout@v4
2122

22-
- name: Create build version
23-
run: echo "BUILD_VERSION=$(cat package.json | grep version | head -1 | awk '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]')" >> $GITHUB_ENV
23+
- name: Setup QEMU
24+
uses: docker/setup-qemu-action@v3
25+
with:
26+
platforms: amd64,arm64
27+
28+
- name: Set up Docker Buildx
29+
uses: docker/setup-buildx-action@v3
2430

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

0 commit comments

Comments
 (0)