Skip to content

Commit

Permalink
Merge branch 'main' into pr/therealharpaljadeja/187
Browse files Browse the repository at this point in the history
  • Loading branch information
soloseng committed Dec 20, 2023
2 parents 8719c08 + 438a17c commit d3991a1
Show file tree
Hide file tree
Showing 34 changed files with 200 additions and 460 deletions.
2 changes: 2 additions & 0 deletions .changeset/eighty-glasses-sip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
2 changes: 2 additions & 0 deletions .changeset/khaki-walls-drum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
2 changes: 2 additions & 0 deletions .changeset/many-goats-teach.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
2 changes: 2 additions & 0 deletions .changeset/neat-bananas-allow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
2 changes: 2 additions & 0 deletions .changeset/real-bottles-swim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
2 changes: 2 additions & 0 deletions .changeset/smooth-moons-battle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
2 changes: 2 additions & 0 deletions .changeset/spotty-starfishes-move.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
2 changes: 2 additions & 0 deletions .changeset/tall-cycles-care.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
11 changes: 11 additions & 0 deletions .changeset/tender-tomatoes-protect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
'@celo/phone-number-privacy-combiner': patch
'@celo/phone-number-privacy-monitor': patch
'@celo/phone-number-privacy-signer': patch
'@celo/phone-number-privacy-common': patch
'@celo/encrypted-backup': patch
'@celo/identity': patch
'@celo/odis-identifiers': patch
---

Update package dependencies to reduce CVEs
2 changes: 2 additions & 0 deletions .changeset/tricky-actors-wait.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
2 changes: 2 additions & 0 deletions .changeset/yellow-spoons-change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
8 changes: 8 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Lines starting with '#' are comments.
# Each line is a file pattern followed by one or more owners.
# For details on acceptable file patterns, please refer to the [Github Documentation](https://help.github.com/articles/about-codeowners/)

# default owners, overridden by package specific owners below
* @celo-org/primitives


2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/issue-template.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Add a New Issue
about: Use this template raise an issue in the Celo Monorepo.
about: Use this template to raise an issue in Social-Connect.
title: "[Issue Title]"
labels:
assignees:
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/request_identifier.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Request Identifier
description: File a request to add a new identifier type to SocialConnect
description: File a request to add a new identifier type to Social-Connect
title: "[Identifier Request]: "
body:
- type: input
Expand Down
34 changes: 0 additions & 34 deletions .github/dependabot.yml

This file was deleted.

8 changes: 5 additions & 3 deletions .github/workflows/odis-combiner-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
paths:
- 'dockerfiles/Dockerfile-combiner'
- 'apps/combiner/**'
- 'yarn.lock'
branches:
- main
tags:
Expand All @@ -14,11 +15,12 @@ on:
paths:
- 'dockerfiles/Dockerfile-combiner'
- 'apps/combiner/**'
- 'yarn.lock'
workflow_dispatch:

jobs:
odis-combiner-build-dev:
uses: celo-org/reusable-workflows/.github/workflows/[email protected].2
uses: celo-org/reusable-workflows/.github/workflows/[email protected].3
name: Build us-west1-docker.pkg.dev/devopsre/dev-images/odis-combiner
if: |
github.ref != 'refs/heads/main'
Expand All @@ -32,7 +34,7 @@ jobs:
trivy: true

odis-combiner-build:
uses: celo-org/reusable-workflows/.github/workflows/[email protected].2
uses: celo-org/reusable-workflows/.github/workflows/[email protected].3
name: Build us-west1-docker.pkg.dev/devopsre/social-connect/odis-combiner
if: |
github.ref == 'refs/heads/main'
Expand All @@ -46,7 +48,7 @@ jobs:
trivy: true

odis-combiner-tag:
uses: celo-org/reusable-workflows/.github/workflows/[email protected].2
uses: celo-org/reusable-workflows/.github/workflows/[email protected].3
name: Build us-west1-docker.pkg.dev/devopsre/social-connect/odis-combiner tag
if: |
startsWith(github.ref, 'refs/tags/odis-combiner-')
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/odis-loadtest-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
paths:
- 'dockerfiles/Dockerfile-loadtest'
- 'apps/monitor/**'
- 'yarn.lock'
branches:
- main
tags:
Expand All @@ -14,11 +15,12 @@ on:
paths:
- 'dockerfiles/Dockerfile-loadtest'
- 'apps/monitor/**'
- 'yarn.lock'
workflow_dispatch:

jobs:
odis-loadtest-build-dev:
uses: celo-org/reusable-workflows/.github/workflows/[email protected].2
uses: celo-org/reusable-workflows/.github/workflows/[email protected].3
name: Build us-west1-docker.pkg.dev/devopsre/dev-images/odis-loadtest
if: |
github.ref != 'refs/heads/main'
Expand All @@ -32,7 +34,7 @@ jobs:
trivy: true

odis-loadtest-build:
uses: celo-org/reusable-workflows/.github/workflows/[email protected].2
uses: celo-org/reusable-workflows/.github/workflows/[email protected].3
name: Build us-west1-docker.pkg.dev/devopsre/social-connect/odis-loadtest
if: |
github.ref == 'refs/heads/main'
Expand All @@ -46,7 +48,7 @@ jobs:
trivy: true

odis-loadtest-tag:
uses: celo-org/reusable-workflows/.github/workflows/[email protected].2
uses: celo-org/reusable-workflows/.github/workflows/[email protected].3
name: Build us-west1-docker.pkg.dev/devopsre/social-connect/odis-loadtest tag
if: |
startsWith(github.ref, 'refs/tags/odis-loadtest-')
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/odis-signer-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
paths:
- 'dockerfiles/Dockerfile-signer'
- 'apps/signer/**'
- 'yarn.lock'
branches:
- main
tags:
Expand All @@ -14,11 +15,12 @@ on:
paths:
- 'dockerfiles/Dockerfile-signer'
- 'apps/signer/**'
- 'yarn.lock'
workflow_dispatch:

jobs:
odis-signer-build-dev:
uses: celo-org/reusable-workflows/.github/workflows/[email protected].2
uses: celo-org/reusable-workflows/.github/workflows/[email protected].3
name: Build us-west1-docker.pkg.dev/devopsre/dev-images/odis-signer
if: |
github.ref != 'refs/heads/main'
Expand All @@ -32,7 +34,7 @@ jobs:
trivy: true

odis-signer-build:
uses: celo-org/reusable-workflows/.github/workflows/[email protected].2
uses: celo-org/reusable-workflows/.github/workflows/[email protected].3
name: Build us-west1-docker.pkg.dev/devopsre/social-connect/odis-signer
if: |
github.ref == 'refs/heads/main'
Expand All @@ -46,7 +48,7 @@ jobs:
trivy: true

odis-signer-tag:
uses: celo-org/reusable-workflows/.github/workflows/[email protected].2
uses: celo-org/reusable-workflows/.github/workflows/[email protected].3
name: Build us-west1-docker.pkg.dev/devopsre/social-connect/odis-signer tag
if: |
startsWith(github.ref, 'refs/tags/odis-signer-')
Expand Down
32 changes: 22 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,41 +13,53 @@ jobs:
name: Release
runs-on: ['self-hosted', 'org', 'npm-publish']
permissions:
contents: write
id-token: write
pull-requests: write
repository-projects: write
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Get GitHub Token from Akeyless
id: get_github_token
uses:
docker://us-west1-docker.pkg.dev/devopsre/akeyless-public/akeyless-action:latest
with:
api-url: https://api.gateway.akeyless.celo-networks-dev.org
access-id: p-kf9vjzruht6l
dynamic-secrets: '{"/dynamic-secrets/keys/github/social-connect/contents=write,pull_requests=write":"PAT"}'

- name: Akeyless Get Secrets
id: get_auth_token
- name: Get NPM Token from Akeyless
id: get_npm_token
uses:
docker://us-west1-docker.pkg.dev/devopsre/akeyless-public/akeyless-action:latest
with:
api-url: https://api.gateway.akeyless.celo-networks-dev.org
access-id: p-kf9vjzruht6l
static-secrets: '{"/static-secrets/apps-tooling-circle/npm-publish-token":"NPM_TOKEN"}'

- name: Checkout Repo
uses: actions/checkout@v4
with:
token: ${{ env.PAT }}

- name: Setup Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 18.x

- name: 'Setup yarn'
shell: bash
run: |
npm install --global yarn
source ~/.bashrc
- name: Install Dependencies
shell: bash
run: yarn

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
if: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ env.PAT }}
NPM_TOKEN: ${{ env.NPM_TOKEN }}
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: yarn release
version: yarn changeset version && yarn
version: yarn version_and_reinstall
6 changes: 3 additions & 3 deletions .github/workflows/social-connect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ jobs:
key: git-${{ github.ref }}
restore-keys: |
git-
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Detect files changed in PR, and expose as output
id: changed-files
uses: tj-actions/changed-files@v39
uses: tj-actions/changed-files@v40
with:
# Using comma as separator to be able to easily match full paths (using ,<path>)
separator: ','
Expand Down Expand Up @@ -264,7 +264,7 @@ jobs:
with:
path: .git
key: git-${{ github.ref }}
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Sync workspace
uses: ./.github/actions/sync-workspace
with:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,3 @@ jobs:
days-before-close: 30
ascending: true
operations-per-run: 50

Empty file modified .husky/pre-push
100644 → 100755
Empty file.
11 changes: 8 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
"typescript.preferences.importModuleSpecifier": "non-relative",
"typescript.updateImportsOnFileMove.enabled": "always",
"editor.codeActionsOnSave": {
"source.organizeImports": false
"source.organizeImports": "never"
},
"[javascript]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": false
"source.organizeImports": "never"
}
},
"[javascriptreact]": {
Expand All @@ -43,5 +43,10 @@
"javascript.format.enable": false,
"editor.tabSize": 2,
"editor.detectIndentation": false,
"typescript.tsdk": "node_modules/typescript/lib"
"typescript.tsdk": "node_modules/typescript/lib",
"[javascriptreact][typescript][typescriptreact]": {
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
}
}
}
6 changes: 5 additions & 1 deletion dockerfiles/Dockerfile-combiner
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,13 @@ COPY packages/identity packages/identity
COPY packages/odis-identifiers packages/odis-identifiers

##### Main stage
FROM node:18
FROM node:18-alpine3.19
LABEL org.opencontainers.image.authors="[email protected]"

# Install dependencies and upgrade OS packages
RUN apk add --no-cache python3 git bash && \
apk upgrade --no-cache

WORKDIR /celo-phone-number-privacy/

# Copy monorepo settings
Expand Down
6 changes: 5 additions & 1 deletion dockerfiles/Dockerfile-loadtest
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@ COPY packages/identity packages/identity
COPY packages/odis-identifiers packages/odis-identifiers

##### Main stage
FROM node:18
FROM node:18-alpine3.19
LABEL org.opencontainers.image.authors="[email protected]"

# Upgrade OS packages
RUN apk add --no-cache python3 git bash && \
apk upgrade --no-cache

WORKDIR /celo-phone-number-privacy/

# Copy monorepo settings
Expand Down
7 changes: 6 additions & 1 deletion dockerfiles/Dockerfile-signer
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@ COPY packages/identity packages/identity
COPY packages/odis-identifiers packages/odis-identifiers

##### Main stage
FROM node:18
FROM node:18-alpine3.19
LABEL org.opencontainers.image.authors="[email protected]"

# Upgrade OS packages
RUN apk add --no-cache python3 git bash && \
apk upgrade --no-cache

WORKDIR /celo-phone-number-privacy/

# Copy monorepo settings
Expand All @@ -28,6 +32,7 @@ ARG PACKAGE_SELECTOR=signer
COPY --from=packages celo-phone-number-privacy/apps/${PACKAGE_SELECTOR} apps/${PACKAGE_SELECTOR}
# COMMENT OUT THIS LINE TO USE PUBLISHED DEPENDENCIES
COPY --from=packages celo-phone-number-privacy/packages packages

# Install dependencies and build. need dev deps too so we can build (tsc)
RUN yarn install --network-timeout 100000 --inline-builds && yarn cache clean
RUN yarn workspaces list
Expand Down
Loading

0 comments on commit d3991a1

Please sign in to comment.