File tree Expand file tree Collapse file tree 1 file changed +51
-0
lines changed
Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Original file line number Diff line number Diff line change 1+ # This GitHub Action checks daily for a new AbraFlexi version and updates static definitions if needed.
2+ # It runs `make static` and pushes the new git tag if a new version is detected.
3+
4+ name : Daily AbraFlexi Version Check & Static Update
5+
6+ on :
7+ schedule :
8+ - cron : ' 0 3 * * *' # Runs every day at 03:00 UTC
9+ workflow_dispatch :
10+
11+ jobs :
12+ check-and-update-static :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Checkout repository
16+ uses : actions/checkout@v4
17+ with :
18+ fetch-depth : 0 # Ensure all tags are fetched
19+
20+ - name : Set up PHP
21+ uses : shivammathur/setup-php@v2
22+ with :
23+ php-version : ' 8.4'
24+ coverage : none
25+
26+ - name : Install dependencies
27+ run : |
28+ composer install --ansi --no-interaction
29+
30+ - name : Get online version
31+ id : online_version
32+ run : |
33+ ONLINE_VERSION=$(php tools/online-version.php)
34+ echo "online_version=$ONLINE_VERSION" >> $GITHUB_OUTPUT
35+
36+ - name : Get latest git tag
37+ id : latest_tag
38+ run : |
39+ LATEST_TAG=$(git tag --list | sort -V | tail -n 1)
40+ echo "latest_tag=$LATEST_TAG" >> $GITHUB_OUTPUT
41+
42+ - name : Compare versions and update static if needed
43+ if : steps.online_version.outputs.online_version != steps.latest_tag.outputs.latest_tag
44+ run : |
45+ make static
46+ git push --tags
47+ env :
48+ GIT_AUTHOR_NAME : GitHub Action
49+ GIT_AUTHOR_EMAIL :
[email protected] 50+ GIT_COMMITTER_NAME : GitHub Action
51+ GIT_COMMITTER_EMAIL :
[email protected]
You can’t perform that action at this time.
0 commit comments