diff options
author | Maurício Meneghini Fauth <mauricio@fauth.dev> | 2022-05-08 18:34:46 +0300 |
---|---|---|
committer | Maurício Meneghini Fauth <mauricio@fauth.dev> | 2022-05-09 19:39:14 +0300 |
commit | 53e78259b6ce5796bfd506a7ee152cc3fd2b7665 (patch) | |
tree | b8a037732703706523e26a1768816db5119151cf /.github/workflows | |
parent | 7aa512c357c3f5d71b077c5349873cba9cb7321b (diff) |
Add workflow to generate daily snapshots
Creates a GitHub Actions workflow that generates phpMyAdmin daily
snapshots.
Currently it persists the snapshots only on GitHub and do not upload to
the phpMyAdmin's website.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/daily-snapshots.yml | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/.github/workflows/daily-snapshots.yml b/.github/workflows/daily-snapshots.yml new file mode 100644 index 0000000000..37ba4bc3ba --- /dev/null +++ b/.github/workflows/daily-snapshots.yml @@ -0,0 +1,74 @@ +name: Daily snapshots + +on: + pull_request: + paths: + - '.github/workflows/daily-snapshots.yml' + - 'scripts/**' + workflow_dispatch: + schedule: + - cron: '0 0 * * *' + +jobs: + generate-snapshots: + name: Generate ${{ matrix.version }} snapshots + runs-on: ubuntu-latest + if: (github.event_name == 'schedule' && github.repository == 'phpmyadmin/phpmyadmin') || (github.event_name != 'schedule') + strategy: + fail-fast: false + matrix: + include: + - { version: '5.1', branch: 'QA_5_1', php-version: '7.1', node-version: '12', python-version: '3.6' } + - { version: '5.2', branch: 'QA_5_2', php-version: '7.2', node-version: '12', python-version: '3.6' } + - { version: '5.3', branch: 'master', php-version: '7.2', node-version: '12', python-version: '3.6' } + steps: + - name: Check out code + uses: actions/checkout@v3 + with: + ref: ${{ matrix.branch }} + + - name: Install Gettext + run: sudo apt-get install -y gettext + + - name: Set up PHP ${{ matrix.php-version }} + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + extensions: mbstring, iconv, mysqli, zip, gd + coverage: none + + - name: Set up Node ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: yarn + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + + - name: Install Composer dependencies + uses: ramsey/composer-install@v2 + with: + dependency-versions: highest + + - name: Install Yarn modules + run: yarn install --non-interactive + + - name: Install Sphinx for the documentation build + run: pip install 'Sphinx' + + - name: Build the release + run: ./scripts/create-release.sh --daily ${{ matrix.version }}+snapshot ${{ matrix.branch }} + + - name: Check release excludes + run: ./scripts/check-release-excludes.sh release/phpMyAdmin-${{ matrix.version }}+snapshot-all-languages.tar.gz + continue-on-error: true + + - name: Upload snapshots + uses: actions/upload-artifact@v3 + with: + name: phpMyAdmin-${{ matrix.version }}-snapshots + path: release/* + retention-days: 1 |