|
16 | 16 | outputs: |
17 | 17 | should_update: ${{ steps.check.outputs.should_update }} |
18 | 18 | latest_tag: ${{ steps.check.outputs.latest_tag }} |
| 19 | + tracked_version: ${{ steps.check.outputs.tracked_version }} |
19 | 20 | branch_name: ${{ steps.check.outputs.branch_name }} |
20 | 21 | steps: |
21 | 22 | - uses: actions/checkout@v6 |
|
37 | 38 | # Check tracked version |
38 | 39 | TRACKED=$(cat .upstream-version 2>/dev/null || echo "none") |
39 | 40 | echo "Currently tracking: $TRACKED" |
| 41 | + echo "tracked_version=$TRACKED" >> $GITHUB_OUTPUT |
40 | 42 |
|
41 | 43 | if [ "$LATEST_TAG" != "$TRACKED" ]; then |
42 | 44 | echo "🆕 New release detected!" |
@@ -108,15 +110,20 @@ jobs: |
108 | 110 | --allowedTools "Read,Edit,Write,Glob,Grep,WebFetch,Bash" |
109 | 111 | prompt: | |
110 | 112 | 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 }} |
111 | 114 |
|
112 | 115 | Please update this Home Assistant add-on to use the new upstream version. |
113 | 116 |
|
114 | | - ## Step 1: Fetch upstream release notes |
| 117 | + ## Step 1: Fetch upstream release notes (ALL intermediate releases) |
115 | 118 |
|
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 |
120 | 127 |
|
121 | 128 | ## Step 2: Check upstream changes for new environment variables |
122 | 129 |
|
@@ -144,8 +151,8 @@ jobs: |
144 | 151 |
|
145 | 152 | 5. **firefox/CHANGELOG.md**: |
146 | 153 | - 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 |
149 | 156 | - Look at previous changelog entries (e.g., 1.7.0, 1.8.0) to see how upstream changes are formatted |
150 | 157 | - If new environment variables were added, mention them in the changelog |
151 | 158 |
|
@@ -200,17 +207,21 @@ jobs: |
200 | 207 | VERSION="${{ needs.check-upstream.outputs.latest_tag }}" |
201 | 208 | BRANCH_NAME="${{ needs.check-upstream.outputs.branch_name }}" |
202 | 209 |
|
| 210 | + TRACKED="${{ needs.check-upstream.outputs.tracked_version }}" |
| 211 | +
|
203 | 212 | PR_URL=$(gh pr create \ |
204 | 213 | --title "🔄 Update to jlesage/docker-firefox $VERSION" \ |
205 | 214 | --body "## Automated Upstream Sync |
206 | 215 |
|
207 | 216 | **New upstream release:** [\`$VERSION\`](https://github.com/jlesage/docker-firefox/releases/tag/$VERSION) |
| 217 | + **Previous tracked version:** \`$TRACKED\` |
208 | 218 |
|
209 | 219 | 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. |
210 | 221 |
|
211 | 222 | ### Checklist |
212 | 223 | - [ ] Review the changes in \`firefox/\` folder |
213 | | - - [ ] Check CHANGELOG.md entry |
| 224 | + - [ ] Check CHANGELOG.md entry covers all intermediate releases |
214 | 225 | - [ ] Verify new environment variables (if any) |
215 | 226 |
|
216 | 227 | --- |
|
0 commit comments