-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'development' of github.com:openforis/fra-platform into …
…3855-move-files-to-s3-bucket
- Loading branch information
Showing
3,171 changed files
with
52,044 additions
and
268,411 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Manual Database Backup | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
environment: | ||
description: 'Environment to backup (production/development)' | ||
required: true | ||
default: 'production' | ||
type: choice | ||
options: | ||
- production | ||
- development | ||
|
||
jobs: | ||
backup: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- name: Install Heroku CLI | ||
run: curl https://cli-assets.heroku.com/install.sh | sh | ||
|
||
- name: Create Heroku Postgres Backup | ||
env: | ||
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} | ||
APP_NAME: ${{ github.event.inputs.environment == 'production' && secrets.HEROKU_APP_NAME_PRODUCTION || secrets.HEROKU_APP_NAME_DEVELOPMENT }} | ||
run: | | ||
heroku pg:backups:capture --app $APP_NAME |
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,69 @@ | ||
name: Manual Database Partial Backup | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
environment: | ||
description: 'Environment to backup (production/development)' | ||
required: true | ||
default: 'production' | ||
type: choice | ||
options: | ||
- production | ||
- development | ||
retention_days: | ||
description: 'Number of days to retain backup' | ||
required: true | ||
default: '7' | ||
type: number | ||
|
||
jobs: | ||
backup: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install PostgreSQL client and GPG | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y curl gnupg2 | ||
curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo gpg --dearmor -o /usr/share/keyrings/postgresql-keyring.gpg | ||
echo "deb [signed-by=/usr/share/keyrings/postgresql-keyring.gpg] http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" | sudo tee /etc/apt/sources.list.d/postgresql.list | ||
sudo apt-get update | ||
sudo apt-get install -y postgresql-client-15 | ||
- name: Verify PostgreSQL version | ||
run: pg_dump --version | ||
|
||
- name: Create Custom Database Backup | ||
env: | ||
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} | ||
HEROKU_APP: ${{ github.event.inputs.environment == 'production' && secrets.HEROKU_APP_NAME_PRODUCTION || secrets.HEROKU_APP_NAME_DEVELOPMENT }} | ||
BACKUP_DIR: ./backups | ||
run: | | ||
export PATH="/usr/lib/postgresql/15/bin:$PATH" | ||
mkdir -p $BACKUP_DIR | ||
./src/tools/heroku/partial-backup.sh | ||
- name: Encrypt Backup | ||
env: | ||
BACKUP_DIR: ./backups | ||
BACKUP_PASSPHRASE: ${{ secrets.BACKUP_PASSPHRASE }} | ||
run: ./src/tools/heroku/encrypt.sh | ||
|
||
- name: Upload encrypted backup artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: encrypted-database-backup-${{ github.event.inputs.environment }}-${{ github.run_id }} | ||
path: ./backups/*.gpg | ||
retention-days: ${{ github.event.inputs.retention_days }} | ||
|
||
# always run to ensure no artifacts are left behind | ||
- name: Cleanup | ||
if: always() | ||
run: | | ||
rm -rf ./backups | ||
# todo: post to slack channel |
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 |
---|---|---|
|
@@ -7,57 +7,19 @@ on: | |
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
services: | ||
postgres: | ||
image: postgis/postgis:12-3.0 | ||
env: | ||
POSTGRES_USER: frap | ||
POSTGRES_PASSWORD: frap | ||
POSTGRES_DB: frap-dev | ||
ports: | ||
- 5442:5432 | ||
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: '0' # fetch all tags, default 1 | ||
|
||
- name: Use Node.js 20.11.1 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '20.11.1' | ||
always-auth: true | ||
auth-token: ${{secrets.ACCESS_TOKEN}} | ||
registry-url: 'https://npm.pkg.github.com' | ||
scope: '@openforis' | ||
|
||
- run: yarn install --network-timeout 1000000 | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.ACCESS_TOKEN }} | ||
|
||
- run: yarn build | ||
env: | ||
PGHOST: localhost | ||
PGPORT: 5442 | ||
PGDATABASE: frap-dev | ||
PGUSER: frap | ||
PGPASSWORD: frap | ||
# - run: yarn test | ||
# env: | ||
# PGHOST: localhost | ||
# PGPORT: 5442 | ||
# PGDATABASE: frap-dev | ||
# PGUSER: frap | ||
# PGPASSWORD: frap | ||
|
||
- name: Get the version | ||
- name: Set version | ||
id: app_version | ||
run: echo ::set-output name=APP_VERSION::$(git describe --always --tags) | ||
|
||
- uses: akhileshns/[email protected] # This is the action | ||
- name: Deploy to Heroku | ||
uses: akhileshns/[email protected] # This is the action | ||
with: | ||
heroku_api_key: ${{secrets.HEROKU_API_KEY}} | ||
heroku_app_name: ${{secrets.HEROKU_APP_NAME_PRODUCTION}} | ||
|
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 |
---|---|---|
|
@@ -7,57 +7,19 @@ on: | |
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
services: | ||
postgres: | ||
image: postgis/postgis:12-3.0 | ||
env: | ||
POSTGRES_USER: frap | ||
POSTGRES_PASSWORD: frap | ||
POSTGRES_DB: frap-dev | ||
ports: | ||
- 5442:5432 | ||
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: '0' # fetch all tags, default 1 | ||
|
||
- name: Use Node.js 20.11.1 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '20.11.1' | ||
always-auth: true | ||
auth-token: ${{secrets.ACCESS_TOKEN}} | ||
registry-url: 'https://npm.pkg.github.com' | ||
scope: '@openforis' | ||
|
||
- run: yarn install --network-timeout 1000000 | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.ACCESS_TOKEN }} | ||
|
||
- run: yarn build | ||
env: | ||
PGHOST: localhost | ||
PGPORT: 5442 | ||
PGDATABASE: frap-dev | ||
PGUSER: frap | ||
PGPASSWORD: frap | ||
# - run: yarn test | ||
# env: | ||
# PGHOST: localhost | ||
# PGPORT: 5442 | ||
# PGDATABASE: frap-dev | ||
# PGUSER: frap | ||
# PGPASSWORD: frap | ||
|
||
- name: Get the version | ||
- name: Set version | ||
id: app_version | ||
run: echo ::set-output name=APP_VERSION::$(git describe --always --tags) | ||
|
||
- uses: akhileshns/[email protected] # This is the action | ||
- name: Deploy to Heroku | ||
uses: akhileshns/[email protected] # This is the action | ||
with: | ||
heroku_api_key: ${{secrets.HEROKU_API_KEY}} | ||
heroku_app_name: ${{secrets.HEROKU_APP_NAME_DEVELOPMENT}} | ||
|
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,34 @@ | ||
name: New Crowdin translations PR | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
crowdin: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Synchronize with Crowdin | ||
uses: crowdin/github-action@v2 | ||
with: | ||
upload_sources: false | ||
upload_translations: false | ||
download_translations: true | ||
# Export options | ||
export_only_approved: true | ||
|
||
localization_branch_name: i18n_crowdin_translations | ||
create_pull_request: true | ||
pull_request_title: "New Crowdin translations" | ||
pull_request_body: "New Crowdin pull request with translations" | ||
pull_request_base_branch_name: "development" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} | ||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} |
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,23 @@ | ||
name: Upload translation sources | ||
|
||
on: | ||
push: | ||
paths: ["src/i18n/resources/en/**/*.json", "!src/i18n/resources/en/panEuropean/**"] | ||
branches: [development] | ||
|
||
jobs: | ||
crowdin-upload-sources: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Crowdin push | ||
uses: crowdin/github-action@v2 | ||
with: | ||
upload_sources: true | ||
upload_translations: false | ||
download_translations: false | ||
env: | ||
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} | ||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} |
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,16 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="db:backup-import" type="ShConfigurationType"> | ||
<option name="SCRIPT_TEXT" value="(cd src/tools/db/importBackup && ./exec.sh) && ts-node src/tools/generateCache/index.ts" /> | ||
<option name="INDEPENDENT_SCRIPT_PATH" value="true" /> | ||
<option name="SCRIPT_OPTIONS" value="" /> | ||
<option name="INDEPENDENT_SCRIPT_WORKING_DIRECTORY" value="true" /> | ||
<option name="SCRIPT_WORKING_DIRECTORY" value="$PROJECT_DIR$" /> | ||
<option name="INDEPENDENT_INTERPRETER_PATH" value="true" /> | ||
<option name="INTERPRETER_PATH" value="/bin/zsh" /> | ||
<option name="INTERPRETER_OPTIONS" value="" /> | ||
<option name="EXECUTE_IN_TERMINAL" value="true" /> | ||
<option name="EXECUTE_SCRIPT_FILE" value="false" /> | ||
<envs /> | ||
<method v="2" /> | ||
</configuration> | ||
</component> |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.