Split the workflow into separate check_version and build jobs using the needs keyword for job dependencies. This improves separation of concerns and makes the workflow structure more explicit.
Key changes:
- Created check_version job that outputs version_changed and version
- Build job now depends on check_version using needs keyword
- Build job uses version from check_version output (no re-reading)
- Added fetch-depth: 0 to ensure full git history for comparison
- Removed duplicate version reading step from build job
- Build conditional now uses needs.check_version.outputs.version_changed
Benefits:
- Clear separation between version checking and build logic
- Version is determined once and reused across jobs
- Better observability with separate job statuses in UI
- Enables potential reuse of version outputs by other jobs
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The workflow now skips the build job when the version in package.json hasn't changed compared to the previous commit. This prevents unnecessary Docker builds when only non-version changes are pushed.
Key changes:
- Added version-check step to compare current and previous package.json versions
- Added job-level conditional to skip build when version is unchanged
- Pull requests always run to validate version bumps before merge
- Handles edge cases: first commit, missing package.json in history
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Updated README to document registry authentication setup using REGISTRY_USERNAME and REGISTRY_TOKEN configured in repo settings. Also removed debug info from workflow step name.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Use GITEA_ACTOR and GITEA_TOKEN for Docker registry login. These secrets
are automatically provided by Gitea Actions and require no manual
configuration.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add simple Node.js Hello World application with automated Docker build and
push workflow using Gitea Actions. The workflow builds and pushes images to
the Gitea registry with versioning from package.json.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>