Skip to content

Commit 58e015b

Browse files
committed
Update GitHub Actions workflow to resolve and publish versioned Docker image tags from demyx orchestrator VERSION file
1 parent 080acb9 commit 58e015b

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

.github/workflows/main.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,24 @@ jobs:
2020
with:
2121
username: demyx
2222
password: ${{ secrets.DOCKER_TOKEN }}
23+
- name: Resolve DEMYX version tag
24+
run: |
25+
DEMYX_VERSION_FILE="$(curl -fsSL https://raw.githubusercontent.com/demyxsh/demyx/refs/heads/master/VERSION)"
26+
DEMYX_VERSION_TAG="$(printf '%s\n' "$DEMYX_VERSION_FILE" | sed -n 's/^DEMYX_VERSION=//p' | head -n 1 | tr -d '[:space:]')"
27+
28+
if [[ -z "$DEMYX_VERSION_TAG" ]]; then
29+
echo "Failed to resolve DEMYX_VERSION from remote VERSION file." >&2
30+
exit 1
31+
fi
32+
33+
echo "DEMYX_VERSION_TAG=$DEMYX_VERSION_TAG" >> "$GITHUB_ENV"
2334
- name: Build
2435
run: |
2536
docker pull alpine
2637
docker pull demyx/nginx
2738
docker pull demyx/mariadb
28-
docker build -t demyx/${{ env.DEMYX_REPOSITORY }} tag-latest
29-
docker build -t demyx/${{ env.DEMYX_REPOSITORY }}:bedrock tag-bedrock
39+
docker build -t demyx/${{ env.DEMYX_REPOSITORY }} -t demyx/${{ env.DEMYX_REPOSITORY }}:${{ env.DEMYX_VERSION_TAG }} tag-latest
40+
docker build -t demyx/${{ env.DEMYX_REPOSITORY }}:bedrock -t demyx/${{ env.DEMYX_REPOSITORY }}:${{ env.DEMYX_VERSION_TAG }}-bedrock tag-bedrock
3041
- name: Test
3142
id: test
3243
shell: 'script -q -e -c "bash {0}"'
@@ -143,3 +154,5 @@ jobs:
143154
144155
docker push demyx/${{ env.DEMYX_REPOSITORY }}
145156
docker push demyx/${{ env.DEMYX_REPOSITORY }}:bedrock
157+
docker push demyx/${{ env.DEMYX_REPOSITORY }}:${{ env.DEMYX_VERSION_TAG }}
158+
docker push demyx/${{ env.DEMYX_REPOSITORY }}:${{ env.DEMYX_VERSION_TAG }}-bedrock

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- Added cron environment defaults in `tag-latest/bin/demyx-sudo` (`SHELL`, `PATH`, `DEMYX*`) to stabilize non-interactive cron execution.
66
- Added `demyx_cron_env()` and log-file path fallback handling in `tag-latest/bin/demyx-cron`.
77
### Changed
8+
- Updated GitHub Actions Docker workflow to publish existing moving image tag(s) plus versioned tag(s) derived from `DEMYX_VERSION` from the `demyx` orchestrator.
89
- Updated `tag-latest` WordPress cron job to run as `demyx` without sudo root elevation.
910
- Switched `tag-latest/bin/demyx-cron` WordPress execution to WP-CLI primary (`wp cron event run --due-now`) and removed `wget`/`wp-cron.php` trigger logic.
1011
- Updated cron logging to include stderr by default (`2>&1 | tee -a ...`) and include executor/path context in log lines.

0 commit comments

Comments
 (0)