Skip to content

Commit

Permalink
Merge pull request #790 from weseek/master
Browse files Browse the repository at this point in the history
Release v0.2.8
  • Loading branch information
ryu-sato authored Feb 15, 2025
2 parents 72fbb95 + 70250e3 commit 76da048
Show file tree
Hide file tree
Showing 28 changed files with 275 additions and 122 deletions.
86 changes: 61 additions & 25 deletions .github/workflows/container-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,57 +11,93 @@ jobs:
strategy:
# Set same as container-test.yaml
matrix:
db_type:
- mongodb
- postgresql
- mariadb
- file
include:
db_tool:
# awesome-mongodb-backup
# Valid versions can be found here https://www.mongodb.com/try/download/database-tools/releases/archive
- db_type: mongodb
db_tool_version: 100.5.2
docker_tag_suffix: mongotool-100.5.2
version: 100.5.4
- db_type: mongodb
version: 100.6.1
- db_type: mongodb
version: 100.7.5
- db_type: mongodb
version: 100.8.0
- db_type: mongodb
version: 100.9.5
- db_type: mongodb
version: 100.10.0
isLatest: true
# awesome-postgresql-backup
# Valid versions can be found here https://apt.postgresql.org/pub/repos/apt/dists/bullseye-pgdg/
- db_type: postgresql
db_tool_version: 11
docker_tag_suffix: postgresql-11
version: 10
- db_type: postgresql
version: 11
- db_type: postgresql
version: 12
- db_type: postgresql
db_tool_version: 16
docker_tag_suffix: postgresql-16
version: 13
- db_type: postgresql
version: 14
- db_type: postgresql
version: 15
- db_type: postgresql
version: 16
- db_type: postgresql
version: 17
isLatest: true
# awesome-mariadb-backup
# Valid versions can be found here https://dlm.mariadb.com/rest/releases/mariadb_server/
- db_type: mariadb
db_tool_version: 10.5.28
docker_tag_suffix: mariadb-10.5.28
version: 10.5.28
- db_type: mariadb
version: 10.6.21
- db_type: mariadb
version: 10.11.11
# awesome-file-backup
- db_type: file
isLatest: true
fail-fast: false

steps:
- uses: actions/checkout@v4
- name: Set up metadata
id: pkg_meta
run: |
echo "package_scope=@awesome-database-backup/awesome-${{ matrix.db_type }}-backup" >> $GITHUB_OUTPUT
echo "package_path=apps/awesome-${{ matrix.db_type }}-backup" >> $GITHUB_OUTPUT
echo "package_repository=weseek/awesome-${{ matrix.db_type }}-backup" >> $GITHUB_OUTPUT
echo "package_scope=@awesome-database-backup/awesome-${{ matrix.db_tool.db_type }}-backup" >> $GITHUB_OUTPUT
echo "package_path=apps/awesome-${{ matrix.db_tool.db_type }}-backup" >> $GITHUB_OUTPUT
echo "package_repository=weseek/awesome-${{ matrix.db_tool.db_type }}-backup" >> $GITHUB_OUTPUT
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to docker.io registry
run:
echo ${{ secrets. DOCKER_REGISTRY_PASSWORD }} |
docker login --username ${{ secrets. DOCKER_REGISTRY_USERNAME }} --password-stdin
- name: Retrieve information from package.json
uses: myrotvorets/info-from-package-json-action@2.0.0
uses: xile611/read-package-version-action@v2.1
id: package-json
- name: Set up Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ steps.pkg_meta.outputs.package_repository }}
# awesome-mongodb-backup:latest ... latest version of awesome-mongodb-backup and latest version of DB tool
# awesome-mongodb-backup:1 ... specified major version of awesome-mongodb-backup and latest version of DB tool
# awesome-mongodb-backup:1.2 ... specified minor version of awesome-mongodb-backup and latest version of DB tool
# awesome-mongodb-backup:1.2.3 ... specified patch version of awesome-mongodb-backup and latest version of DB tool
# awesome-mongodb-backup:1.2.3-mongodb-100.5.4 ... specified patch version of awesome-mongodb-backup and latest version of DB tool (except when DB tool version does not exist)
# awesome-mongodb-backup:mongodb-100.5.4 ... specified version of DB tool version and latest version of awesome-mongodb-backup (except when DB tool version does not exist)
# awesome-mongodb-backup:mongodb-100.5.4-1 ... specified version of DB tool version and major version of awesome-mongodb-backup (except when DB tool version does not exist)
# awesome-mongodb-backup:mongodb-100.5.4-1.2 ... specified version of DB tool version and minor version of awesome-mongodb-backup (except when DB tool version does not exist)
tags: |
type=raw,value=latest
type=semver,value=v${{ steps.package-json.outputs.packageVersion }},pattern={{major}}
type=semver,value=v${{ steps.package-json.outputs.packageVersion }},pattern={{major}}.{{minor}}
type=semver,value=v${{ steps.package-json.outputs.packageVersion }},pattern={{major}}.{{minor}}.{{patch}}
type=semver,value=v${{ steps.package-json.outputs.packageVersion }}-${{ matrix.docker_tag_suffix }},pattern={{major}}.{{minor}}.{{patch}}
enable=${{ matrix.db_tool.isLatest != '' }},type=raw,value=latest
type=raw,value=${{ steps.package-json.outputs.major }}
type=raw,value=${{ steps.package-json.outputs.major }}.${{ steps.package-json.outputs.minor }}
type=raw,value=${{ steps.package-json.outputs.full }}
enable=${{ matrix.db_tool.version != '' }},type=raw,value=${{ steps.package-json.outputs.full }}-${{ matrix.db_tool.db_type }}-${{ matrix.db_tool.version }}
enable=${{ matrix.db_tool.version != '' }},type=raw,value=${{ matrix.db_tool.db_type }}-${{ matrix.db_tool.version }}
enable=${{ matrix.db_tool.version != '' }},type=raw,value=${{ matrix.db_tool.db_type }}-${{ matrix.db_tool.version }}-${{ steps.package-json.outputs.major }}
enable=${{ matrix.db_tool.version != '' }},type=raw,value=${{ matrix.db_tool.db_type }}-${{ matrix.db_tool.version }}-${{ steps.package-json.outputs.major }}.${{ steps.package-json.outputs.minor }}
- name: Build and push container
uses: docker/build-push-action@v5
with:
Expand All @@ -72,8 +108,8 @@ jobs:
build-args: |
packageScope=${{ steps.pkg_meta.outputs.package_scope }}
packagePath=${{ steps.pkg_meta.outputs.package_path }}
dbType=${{ matrix.db_type }}
dbToolVersion=${{ matrix.db_tool_version }}
dbType=${{ matrix.db_tool.db_type }}
dbToolVersion=${{ matrix.db_tool.version }}
tags: ${{ steps.meta.outputs.tags }}

- name: Update Docker hub's description
Expand Down
76 changes: 59 additions & 17 deletions .github/workflows/container-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,40 +14,69 @@ jobs:
strategy:
# Set same as container-publish.yaml
matrix:
db_type:
- mongodb
- postgresql
- mariadb
- file
include:
db_tool:
# awesome-mongodb-backup
# Valid versions can be found here https://www.mongodb.com/try/download/database-tools/releases/archive
- db_type: mongodb
db_tool_version: 100.5.2
version: 100.5.4
- db_type: mongodb
version: 100.6.1
- db_type: mongodb
version: 100.7.5
- db_type: mongodb
version: 100.8.0
- db_type: mongodb
version: 100.9.5
- db_type: mongodb
version: 100.10.0
# awesome-postgresql-backup
# Valid versions can be found here https://apt.postgresql.org/pub/repos/apt/dists/bullseye-pgdg/
- db_type: postgresql
db_tool_version: 11
version: 10
- db_type: postgresql
version: 11
- db_type: postgresql
version: 12
- db_type: postgresql
version: 13
- db_type: postgresql
version: 14
- db_type: postgresql
version: 15
- db_type: postgresql
version: 16
- db_type: postgresql
version: 17
# awesome-mariadb-backup
# Valid versions can be found here https://dlm.mariadb.com/rest/releases/mariadb_server/
- db_type: mariadb
db_tool_version: 10.5.28
version: 10.5.28
- db_type: mariadb
version: 10.6.21
- db_type: mariadb
version: 10.11.11
# awesome-file-backup
- db_type: file

steps:
- uses: actions/checkout@v4
- name: Set up metadata
id: pkg_meta
run: |
echo "package_scope=@awesome-database-backup/awesome-${{ matrix.db_type }}-backup" >> $GITHUB_OUTPUT
echo "package_path=apps/awesome-${{ matrix.db_type }}-backup" >> $GITHUB_OUTPUT
echo "package_image_name=weseek/awesome-${{ matrix.db_type }}-backup" >> $GITHUB_OUTPUT
echo "package_scope=@awesome-database-backup/awesome-${{ matrix.db_tool.db_type }}-backup" >> $GITHUB_OUTPUT
echo "package_path=apps/awesome-${{ matrix.db_tool.db_type }}-backup" >> $GITHUB_OUTPUT
echo "package_image_name=weseek/awesome-${{ matrix.db_tool.db_type }}-backup" >> $GITHUB_OUTPUT
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key:
${{ runner.os }}-buildx-app-${{ matrix.db_type }}-${{ github.sha }}
${{ runner.os }}-buildx-app-${{ matrix.db_tool.db_type }}-${{ matrix.db_tool.version }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-app-${{ matrix.db_type }}-
${{ runner.os }}-buildx-app-${{ matrix.db_tool.db_type }}-${{ matrix.db_tool.version }}-
${{ runner.os }}-buildx-app-${{ matrix.db_tool.db_type }}-
${{ runner.os }}-buildx-app-
- name: Build container (No push)
uses: docker/build-push-action@v5
Expand All @@ -59,8 +88,8 @@ jobs:
build-args: |
packageScope=${{ steps.pkg_meta.outputs.package_scope }}
packagePath=${{ steps.pkg_meta.outputs.package_path }}
dbType=${{ matrix.db_type }}
dbToolVersion=${{ matrix.db_tool_version }}
dbType=${{ matrix.db_tool.db_type }}
dbToolVersion=${{ matrix.db_tool.version }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
tags: ${{ steps.pkg_meta.outputs.package_image_name }}:latest
Expand All @@ -75,4 +104,17 @@ jobs:
uses: brpaz/[email protected]
with:
image: ${{ steps.pkg_meta.outputs.package_image_name }}:latest
configFile: ./docker/test/${{ matrix.db_type }}/structure-tests.yml
configFile: ./docker/test/${{ matrix.db_tool.db_type }}/structure-tests.yml
env:
BACKUP_TOOL_VERSION: ${{ matrix.db_tool.version }}

# In order to add a status check of the entire workflow as a condition in the ruleset, we define a job to be executed when the preceding job is successful.
# This is so that if the version of the DB tool is updated in the future, the rule set conditions will not need to be changed.
# You can only specify a job, and the job name is named by a combination of the matrix.
# (ex. container-test / (mariadb, 10.11.11)
check-all-tests:
needs: container-test
runs-on: ubuntu-latest
name: Container - Test is passed successfully
steps:
- run: echo "All tests passed successfully!"
10 changes: 5 additions & 5 deletions apps/awesome-file-backup/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@awesome-database-backup/awesome-file-backup",
"version": "0.2.7",
"version": "0.2.8",
"description": "Collection of CLI executable npm packages which backup data stored in a file system and store to Amazon S3 or Google Cloud Storage. You can set a custom S3 endpoint to use S3 based services like DigitalOcean Spaces instead of Amazon S3.",
"author": "Ryu Sato <[email protected]>",
"license": "MIT",
Expand All @@ -13,10 +13,10 @@
"url": "https://github.com/weseek/awesome-database-backup/issues"
},
"dependencies": {
"@awesome-database-backup/file-backup": "^0.2.7",
"@awesome-database-backup/file-restore": "^0.2.7",
"@awesome-database-backup/list": "^0.2.7",
"@awesome-database-backup/prune": "^0.2.7"
"@awesome-database-backup/file-backup": "^0.2.8",
"@awesome-database-backup/file-restore": "^0.2.8",
"@awesome-database-backup/list": "^0.2.8",
"@awesome-database-backup/prune": "^0.2.8"
},
"devDependencies": {}
}
10 changes: 5 additions & 5 deletions apps/awesome-mariadb-backup/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@awesome-database-backup/awesome-mariadb-backup",
"version": "0.2.7",
"version": "0.2.8",
"description": "Collection of scripts which backup MariaDB databases to Amazon S3 or Google Cloud Storage. You can set a custom S3 endpoint to use S3 based services like DigitalOcean Spaces instead of Amazon S3.",
"author": "Ryu Sato <[email protected]>",
"license": "MIT",
Expand All @@ -13,10 +13,10 @@
"url": "https://github.com/weseek/awesome-database-backup/issues"
},
"dependencies": {
"@awesome-database-backup/mariadb-backup": "^0.2.7",
"@awesome-database-backup/mariadb-restore": "^0.2.7",
"@awesome-database-backup/list": "^0.2.7",
"@awesome-database-backup/prune": "^0.2.7"
"@awesome-database-backup/mariadb-backup": "^0.2.8",
"@awesome-database-backup/mariadb-restore": "^0.2.8",
"@awesome-database-backup/list": "^0.2.8",
"@awesome-database-backup/prune": "^0.2.8"
},
"devDependencies": {}
}
10 changes: 5 additions & 5 deletions apps/awesome-mongodb-backup/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@awesome-database-backup/awesome-mongodb-backup",
"version": "0.2.7",
"version": "0.2.8",
"description": "Collection of scripts which backup MongoDB databases to Amazon S3 or Google Cloud Storage. You can set a custom S3 endpoint to use S3 based services like DigitalOcean Spaces instead of Amazon S3.",
"author": "Ryu Sato <[email protected]>",
"license": "MIT",
Expand All @@ -13,10 +13,10 @@
"url": "https://github.com/weseek/awesome-database-backup/issues"
},
"dependencies": {
"@awesome-database-backup/mongodb-backup": "^0.2.7",
"@awesome-database-backup/mongodb-restore": "^0.2.7",
"@awesome-database-backup/list": "^0.2.7",
"@awesome-database-backup/prune": "^0.2.7"
"@awesome-database-backup/mongodb-backup": "^0.2.8",
"@awesome-database-backup/mongodb-restore": "^0.2.8",
"@awesome-database-backup/list": "^0.2.8",
"@awesome-database-backup/prune": "^0.2.8"
},
"devDependencies": {}
}
10 changes: 5 additions & 5 deletions apps/awesome-postgresql-backup/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@awesome-database-backup/awesome-postgresql-backup",
"version": "0.2.7",
"version": "0.2.8",
"description": "Collection of scripts which backup PostgreSQL databases to Amazon S3 or Google Cloud Storage. You can set a custom S3 endpoint to use S3 based services like DigitalOcean Spaces instead of Amazon S3.",
"author": "Ryu Sato <[email protected]>",
"license": "MIT",
Expand All @@ -13,10 +13,10 @@
"url": "https://github.com/weseek/awesome-database-backup/issues"
},
"dependencies": {
"@awesome-database-backup/postgresql-backup": "^0.2.7",
"@awesome-database-backup/postgresql-restore": "^0.2.7",
"@awesome-database-backup/list": "^0.2.7",
"@awesome-database-backup/prune": "^0.2.7"
"@awesome-database-backup/postgresql-backup": "^0.2.8",
"@awesome-database-backup/postgresql-restore": "^0.2.8",
"@awesome-database-backup/list": "^0.2.8",
"@awesome-database-backup/prune": "^0.2.8"
},
"devDependencies": {}
}
8 changes: 4 additions & 4 deletions apps/file-backup/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@awesome-database-backup/file-backup",
"version": "0.2.7",
"version": "0.2.8",
"description": "Backup data stored in a file system and store to Amazon S3 or Google Cloud Storage. You can set a custom S3 endpoint to use S3 based services like DigitalOcean Spaces instead of Amazon S3.",
"author": "Ryu Sato <[email protected]>",
"license": "MIT",
Expand Down Expand Up @@ -30,15 +30,15 @@
"lint:fix": "eslint src --ext .ts --fix"
},
"dependencies": {
"@awesome-database-backup/commands": "^0.2.7",
"@awesome-database-backup/commands": "^0.2.8",
"bunyan": "^1.8.15",
"universal-bunyan": "^0.9.2",
"browser-bunyan": "^1.6.3",
"tmp": "^0.2.1"
},
"devDependencies": {
"@awesome-database-backup/tsconfig": "^0.2.7",
"@awesome-database-backup/storage-service-test": "^0.2.7",
"@awesome-database-backup/tsconfig": "^0.2.8",
"@awesome-database-backup/storage-service-test": "^0.2.8",
"cross-env": "^7.0.3",
"tsconfig-paths": "^4.0.0",
"@types/bunyan": "^1.8.8"
Expand Down
10 changes: 5 additions & 5 deletions apps/file-restore/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@awesome-database-backup/file-restore",
"version": "0.2.7",
"version": "0.2.8",
"description": "Restore data stored in a file system from backuped file on Amazon S3 or Google Cloud Storage. You can set a custom S3 endpoint to use S3 based services like DigitalOcean Spaces instead of Amazon S3.",
"author": "Ryu Sato <[email protected]>",
"license": "MIT",
Expand Down Expand Up @@ -30,15 +30,15 @@
"lint:fix": "eslint src --ext .ts --fix"
},
"dependencies": {
"@awesome-database-backup/commands": "^0.2.7",
"@awesome-database-backup/commands": "^0.2.8",
"bunyan": "^1.8.15",
"universal-bunyan": "^0.9.2",
"browser-bunyan": "^1.6.3"
},
"devDependencies": {
"@awesome-database-backup/tsconfig": "^0.2.7",
"@awesome-database-backup/storage-service-test": "^0.2.7",
"@awesome-database-backup/file-test": "^0.2.7",
"@awesome-database-backup/tsconfig": "^0.2.8",
"@awesome-database-backup/storage-service-test": "^0.2.8",
"@awesome-database-backup/file-test": "^0.2.8",
"cross-env": "^7.0.3",
"tsconfig-paths": "^4.0.0",
"@types/bunyan": "^1.8.8"
Expand Down
Loading

0 comments on commit 76da048

Please sign in to comment.