Skip to content

Commit 027dd04

Browse files
authored
Merge pull request #92 from Mincka/claude/fix-upstream-release-detection-3fwtd
Track intermediate upstream releases in version check workflow
2 parents f5d89ba + 5827978 commit 027dd04

1 file changed

Lines changed: 19 additions & 8 deletions

File tree

.github/workflows/check-upstream-release.yml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
outputs:
1717
should_update: ${{ steps.check.outputs.should_update }}
1818
latest_tag: ${{ steps.check.outputs.latest_tag }}
19+
tracked_version: ${{ steps.check.outputs.tracked_version }}
1920
branch_name: ${{ steps.check.outputs.branch_name }}
2021
steps:
2122
- uses: actions/checkout@v6
@@ -37,6 +38,7 @@ jobs:
3738
# Check tracked version
3839
TRACKED=$(cat .upstream-version 2>/dev/null || echo "none")
3940
echo "Currently tracking: $TRACKED"
41+
echo "tracked_version=$TRACKED" >> $GITHUB_OUTPUT
4042
4143
if [ "$LATEST_TAG" != "$TRACKED" ]; then
4244
echo "🆕 New release detected!"
@@ -108,15 +110,20 @@ jobs:
108110
--allowedTools "Read,Edit,Write,Glob,Grep,WebFetch,Bash"
109111
prompt: |
110112
A new version of jlesage/docker-firefox has been released: ${{ needs.check-upstream.outputs.latest_tag }}
113+
The currently tracked version is: ${{ needs.check-upstream.outputs.tracked_version }}
111114
112115
Please update this Home Assistant add-on to use the new upstream version.
113116
114-
## Step 1: Fetch upstream release notes
117+
## Step 1: Fetch upstream release notes (ALL intermediate releases)
115118
116-
IMPORTANT: First, fetch the upstream release notes to understand what changed:
117-
- Fetch https://api.github.com/repos/jlesage/docker-firefox/releases/tags/${{ needs.check-upstream.outputs.latest_tag }}
118-
- Parse the "body" field from the JSON response to get the release notes
119-
- You MUST include these changes in the changelog entries later
119+
IMPORTANT: There may be MULTIPLE upstream releases between our tracked version (${{ needs.check-upstream.outputs.tracked_version }}) and the latest (${{ needs.check-upstream.outputs.latest_tag }}).
120+
You MUST fetch and include release notes for ALL intermediate versions, not just the latest one.
121+
122+
1. Fetch the list of all releases: https://api.github.com/repos/jlesage/docker-firefox/releases?per_page=20
123+
2. Parse the JSON array and identify ALL releases that are NEWER than ${{ needs.check-upstream.outputs.tracked_version }} (up to and including ${{ needs.check-upstream.outputs.latest_tag }})
124+
3. For each intermediate release, extract the "tag_name" and "body" fields
125+
4. You MUST include the changes from ALL intermediate releases in the changelog entries later, not just the latest one
126+
5. If a release contains significant Firefox-specific changes (not just baseimage updates), note this for version bumping decisions
120127
121128
## Step 2: Check upstream changes for new environment variables
122129
@@ -144,8 +151,8 @@ jobs:
144151
145152
5. **firefox/CHANGELOG.md**:
146153
- Add a new entry documenting the upstream update
147-
- IMPORTANT: Include the changes from the upstream release notes you fetched in Step 1
148-
- Format: "Base image update: jlesage/docker-firefox to ${{ needs.check-upstream.outputs.latest_tag }}" followed by the upstream changes
154+
- IMPORTANT: Include the changes from ALL intermediate upstream releases you fetched in Step 1 (from ${{ needs.check-upstream.outputs.tracked_version }} to ${{ needs.check-upstream.outputs.latest_tag }}), not just the latest release
155+
- Format: "Base image update: jlesage/docker-firefox to ${{ needs.check-upstream.outputs.latest_tag }}" followed by the combined upstream changes from all intermediate releases
149156
- Look at previous changelog entries (e.g., 1.7.0, 1.8.0) to see how upstream changes are formatted
150157
- If new environment variables were added, mention them in the changelog
151158
@@ -200,17 +207,21 @@ jobs:
200207
VERSION="${{ needs.check-upstream.outputs.latest_tag }}"
201208
BRANCH_NAME="${{ needs.check-upstream.outputs.branch_name }}"
202209
210+
TRACKED="${{ needs.check-upstream.outputs.tracked_version }}"
211+
203212
PR_URL=$(gh pr create \
204213
--title "🔄 Update to jlesage/docker-firefox $VERSION" \
205214
--body "## Automated Upstream Sync
206215
207216
**New upstream release:** [\`$VERSION\`](https://github.com/jlesage/docker-firefox/releases/tag/$VERSION)
217+
**Previous tracked version:** \`$TRACKED\`
208218
209219
This PR updates the Firefox Home Assistant add-on to use the latest upstream Docker image.
220+
All intermediate releases between \`$TRACKED\` and \`$VERSION\` are included in the changelog.
210221
211222
### Checklist
212223
- [ ] Review the changes in \`firefox/\` folder
213-
- [ ] Check CHANGELOG.md entry
224+
- [ ] Check CHANGELOG.md entry covers all intermediate releases
214225
- [ ] Verify new environment variables (if any)
215226
216227
---

0 commit comments

Comments
 (0)