Skip to content

Commit

Permalink
Add drupal cms template auto updates
Browse files Browse the repository at this point in the history
  • Loading branch information
csandanov committed Jan 27, 2025
1 parent 7633cfd commit 17eaa6d
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 37 deletions.
77 changes: 40 additions & 37 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Update
on:
push:
branches:
- master
- master

schedule:
- cron: '0 2 * * *'
- cron: '0 2 * * *'

pull_request:
workflow_dispatch:
Expand All @@ -22,64 +22,67 @@ env:
jobs:
repos:
runs-on: ubuntu-latest
strategy:
matrix:
script: [ drupal-vanilla,drupal-cms-template ]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions
with:
dir: repos
script: drupal-vanilla
- uses: actions/checkout@v4
- uses: ./.github/actions
with:
dir: repos
script: ${{ matrix.script }}
alpine:
runs-on: ubuntu-latest
strategy:
matrix:
script: [mariadb,nginx,opensmtpd,varnish,squid]
script: [ mariadb,nginx,opensmtpd,varnish,squid ]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions
with:
dir: alpine
script: ${{ matrix.script }}
- uses: actions/checkout@v4
- uses: ./.github/actions
with:
dir: alpine
script: ${{ matrix.script }}
images:
runs-on: ubuntu-latest
strategy:
matrix:
script: [alpine,apache,memcached,node,php,postgres,python,redis,valkey,ruby]
script: [ alpine,apache,memcached,node,php,postgres,python,redis,valkey,ruby ]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions
with:
dir: images
script: ${{ matrix.script }}
- uses: actions/checkout@v4
- uses: ./.github/actions
with:
dir: images
script: ${{ matrix.script }}
stability-tags:
runs-on: ubuntu-latest
strategy:
matrix:
script: [drupal-php,wordpress-php,adminer-php,matomo-php,webgrind-php,laravel-php,drupal,wordpress,xhprof,drupal-cms]
script: [ drupal-php,wordpress-php,adminer-php,matomo-php,webgrind-php,laravel-php,drupal,wordpress,xhprof,drupal-cms ]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions
with:
dir: stability-tags
script: ${{ matrix.script }}
- uses: actions/checkout@v4
- uses: ./.github/actions
with:
dir: stability-tags
script: ${{ matrix.script }}
upstream:
runs-on: ubuntu-latest
strategy:
matrix:
script: [adminer,cachet,drupal,elasticsearch,kibana,mariadb,matomo,nginx,varnish,webgrind,wordpress,xhprof,drupal-cms]
script: [ adminer,cachet,drupal,elasticsearch,kibana,mariadb,matomo,nginx,varnish,webgrind,wordpress,xhprof,drupal-cms ]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions
with:
dir: upstream
script: ${{ matrix.script }}
- uses: actions/checkout@v4
- uses: ./.github/actions
with:
dir: upstream
script: ${{ matrix.script }}
docker4x:
runs-on: ubuntu-latest
strategy:
matrix:
script: [drupal,php,python,ruby,wordpress,laravel]
script: [ drupal,php,python,ruby,wordpress,laravel ]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions
with:
dir: docker4x
script: ${{ matrix.script }}
- uses: actions/checkout@v4
- uses: ./.github/actions
with:
dir: docker4x
script: ${{ matrix.script }}
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,13 @@ Update images stability tags
| [wodby/docker4wordpress] |
| [wodby/docker4laravel] |

### Build templates

| Project | Versions |
|-----------------------------|----------|
| [wodby/vanilla-drupal] | 11 10 7 |
| [wodby/drupal-cms-template] | 1 |

Not automated:

- Adding new minor/major version
Expand Down Expand Up @@ -171,6 +178,10 @@ Not automated:

[wodby/drupal-php]: https://github.com/wodby/drupal-php

[wodby/drupal-cms-template]: https://github.com/wodby/drupal-cms-template

[wodby/drupal-vanilla]: https://github.com/wodby/drupal-vanilla

[wodby/laravel-php]: https://github.com/wodby/laravel-php

[wodby/drupal]: https://github.com/wodby/drupal
Expand Down
7 changes: 7 additions & 0 deletions repos/drupal-cms-template.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

set -e

. ../update.sh

update_drupal_cms_template
15 changes: 15 additions & 0 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -697,3 +697,18 @@ update_drupal_vanilla() {
_git_commit /tmp/drupal-vanilla "Update Drupal 7"
git push origin
}

update_drupal_cms_template() {
echo "Updating Drupal CMS 1.x template"
_git_clone "wodby/drupal-cms-template"
git clone "https://git.drupalcode.org/project/cms.git" /tmp/cms
cd /tmp/cms
latest_ver=$(git show-ref --tags | grep -P -o '(?<=refs/tags/)1\.[0-9]+\.[0-9]+$' | sort -rV | head -n1)
git checkout "${latest_ver}"
cp -R composer.json web /tmp/drupal-cms-template
cd /tmp/drupal-cms-template
apk add --update composer
composer update --no-install --ignore-platform-reqs
_git_commit /tmp/drupal-cms-template "Update Drupal CMS 1.x"
git push origin
}

0 comments on commit 17eaa6d

Please sign in to comment.