-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
119 changed files
with
35,807 additions
and
21,923 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#pattern filter=crypt diff=crypt merge=crypt | ||
public/data/textile/processes_impacts.json filter=crypt diff=crypt merge=crypt | ||
public/data/food/processes_impacts.json filter=crypt diff=crypt merge=crypt | ||
public/data/object/processes_impacts.json filter=crypt diff=crypt merge=crypt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,9 +8,6 @@ permissions: | |
contents: write | ||
pull-requests: write | ||
|
||
env: | ||
ECOBALYSE_DATA_DIR: ./ecobalyse-private | ||
|
||
jobs: | ||
create_tag_and_release: | ||
# The tag and the release should be created only when the automated PR created by `create_pr_for_changelog` is merged | ||
|
@@ -27,6 +24,13 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install transcrypt | ||
run: | | ||
mkdir -p $HOME/.local/bin | ||
echo "$HOME/.local/bin" >> $GITHUB_PATH | ||
wget https://raw.githubusercontent.com/elasticdog/transcrypt/016b2e4b31951be5ea96233d8d2badef9c9836b6/transcrypt -O "$HOME/.local/bin/transcrypt" | ||
chmod +x "$HOME/.local/bin/transcrypt" | ||
- name: Get latest version | ||
uses: orhun/git-cliff-action@v4 | ||
id: git_cliff | ||
|
@@ -60,13 +64,6 @@ jobs: | |
if: steps.tag_creation.outputs.tag_created | ||
run: npm ci --prefer-offline --no-audit | ||
|
||
- name: Clone the detailed impacts | ||
if: steps.tag_creation.outputs.tag_created | ||
run: | | ||
eval `ssh-agent -s` | ||
ssh-add - <<< '${{ secrets.PRIVATE_SSH_KEY }}' | ||
git clone [email protected]:MTES-MCT/ecobalyse-private.git | ||
- name: Build app | ||
if: steps.tag_creation.outputs.tag_created | ||
env: | ||
|
@@ -84,9 +81,9 @@ jobs: | |
# We include the encrypted detailed processes with the dist | ||
# so that people with the encryption key could later on use the app with the exact | ||
# files it was using on production | ||
npm run encrypt $ECOBALYSE_DATA_DIR/data/textile/processes_impacts.json dist/processes_impacts_textile.json.enc | ||
npm run encrypt $ECOBALYSE_DATA_DIR/data/food/processes_impacts.json dist/processes_impacts_food.json.enc | ||
npm run encrypt $ECOBALYSE_DATA_DIR/data/object/processes_impacts.json dist/processes_impacts_object.json.enc | ||
npm run encrypt public/data/textile/processes_impacts.json dist/processes_impacts_textile.json.enc | ||
npm run encrypt public/data/food/processes_impacts.json dist/processes_impacts_food.json.enc | ||
npm run encrypt public/data/object/processes_impacts.json dist/processes_impacts_object.json.enc | ||
- name: Generate dist archive | ||
if: steps.tag_creation.outputs.tag_created | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ name: Node.js CI | |
|
||
env: | ||
NODE_ENV: test | ||
ECOBALYSE_DATA_DIR: ./ecobalyse-private | ||
TRANSCRYPT_KEY: ${{ secrets.TRANSCRYPT_KEY }} | ||
on: | ||
push: | ||
branches: [ master, staging ] | ||
|
@@ -24,6 +24,13 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install transcrypt | ||
run: | | ||
mkdir -p $HOME/.local/bin | ||
echo "$HOME/.local/bin" >> $GITHUB_PATH | ||
wget https://raw.githubusercontent.com/elasticdog/transcrypt/016b2e4b31951be5ea96233d8d2badef9c9836b6/transcrypt -O "$HOME/.local/bin/transcrypt" | ||
chmod +x "$HOME/.local/bin/transcrypt" | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
|
@@ -53,6 +60,9 @@ jobs: | |
- name: Install Node dependencies | ||
run: npm ci --prefer-offline --no-audit | ||
|
||
- name: Check JSON db formating | ||
run: npm run db:validate | ||
|
||
- name: Install Python dependencies | ||
run: pip install pipenv && pipenv install -d | ||
|
||
|
@@ -61,26 +71,6 @@ jobs: | |
sudo apt-get update | ||
sudo apt-get install -y gettext | ||
- name: Clone the detailed impacts | ||
run: | | ||
eval `ssh-agent -s` | ||
# Private ssh key used by this Github action to clone the private repo | ||
# The corresponding public key must be set as a deploy key of the private repo | ||
ssh-add - <<< '${{ secrets.PRIVATE_SSH_KEY }}' | ||
git clone [email protected]:MTES-MCT/ecobalyse-private.git | ||
- name: Checkout specific ecobalyse-private branch | ||
if: ${{ github.event_name == 'pull_request' }} | ||
env: | ||
LAST_COMMIT_SHA: ${{ github.event.pull_request.head.sha }} | ||
GITHUB_ACCESS_TOKEN: ${{ secrets.GH_REST_ACCESS_TOKEN }} | ||
run: | | ||
eval `ssh-agent -s` | ||
# Private ssh key used by this Github action to clone the private repo | ||
# The corresponding public key must be set as a deploy key of the private repo | ||
ssh-add - <<< '${{ secrets.PRIVATE_SSH_KEY }}' | ||
pipenv run ./bin/checkout-ecobalyse-private-branch.sh $LAST_COMMIT_SHA | ||
- name: Build app | ||
run: npm run build --if-present | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ on: | |
|
||
env: | ||
NODE_ENV: test | ||
ECOBALYSE_DATA_DIR: ./ecobalyse-private | ||
TRANSCRYPT_KEY: ${{ secrets.TRANSCRYPT_KEY }} | ||
|
||
jobs: | ||
score_history: | ||
|
@@ -25,6 +25,13 @@ jobs: | |
|
||
- uses: actions/checkout@v4 | ||
|
||
- name: Install transcrypt | ||
run: | | ||
mkdir -p $HOME/.local/bin | ||
echo "$HOME/.local/bin" >> $GITHUB_PATH | ||
wget https://raw.githubusercontent.com/elasticdog/transcrypt/016b2e4b31951be5ea96233d8d2badef9c9836b6/transcrypt -O "$HOME/.local/bin/transcrypt" | ||
chmod +x "$HOME/.local/bin/transcrypt" | ||
- name: Install Scalingo CLI | ||
uses: ./.github/actions/scalingo-cli | ||
|
||
|
@@ -72,24 +79,6 @@ jobs: | |
run: pip install numpy pandas requests python-dotenv GitPython sqlalchemy psycopg2 | ||
|
||
|
||
- name: Clone the detailed impacts | ||
run: | | ||
eval `ssh-agent -s` | ||
ssh-add - <<< '${{ secrets.PRIVATE_SSH_KEY }}' | ||
git clone [email protected]:MTES-MCT/ecobalyse-private.git | ||
- name: Checkout specific ecobalyse-private branch | ||
env: | ||
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
eval `ssh-agent -s` | ||
# Private ssh key used by this Github action to clone the private repo | ||
# The corresponding public key must be set as a deploy key of the private repo | ||
ssh-add - <<< '${{ secrets.PRIVATE_SSH_KEY }}' | ||
# As this action is not triggered by the pull_request event, the current sha | ||
# can be found in $GITHUB_SHA (setup by github actions) | ||
pipenv run ./bin/checkout-ecobalyse-private-branch.sh $GITHUB_SHA | ||
- name: Add scalingo to know hosts | ||
run: echo "KNOWN_HOSTS=$(ssh-keyscan -H ssh.osc-fr1.scalingo.com)" >> $GITHUB_ENV | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
bsdmainutils |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.