mirror of
https://github.com/fradelg/docker-mysql-cron-backup.git
synced 2025-01-19 00:32:34 +01:00
27 lines
683 B
YAML
27 lines
683 B
YAML
|
name: build docker image
|
||
|
|
||
|
on:
|
||
|
workflow_dispatch:
|
||
|
push:
|
||
|
branches:
|
||
|
- "**"
|
||
|
|
||
|
jobs:
|
||
|
test:
|
||
|
runs-on: ubuntu-22.04
|
||
|
steps:
|
||
|
- name: Checkout the code
|
||
|
uses: actions/checkout@v4
|
||
|
- name: Test Bash scripts
|
||
|
run: sudo apt-get -qq update && sudo apt-get install -y devscripts shellcheck && make test
|
||
|
- name: Test image
|
||
|
env:
|
||
|
VOLUME_PATH: /tmp/mariadb
|
||
|
DATABASE_NAME: foo
|
||
|
MARIADB_ROOT_PASSWORD: abcd
|
||
|
run: |
|
||
|
docker compose up -d mariadb
|
||
|
docker compose run backup /backup.sh
|
||
|
docker compose run backup /restore.sh /backup/latest.foo.sql.gz
|
||
|
docker compose stop
|