Skip to content

Commit 2571d61

Browse files
committed
Don't make release when source has not changed
Sometimes the archive still points to previous days. Trying to make a release twice will error
1 parent 5bbcd5a commit 2571d61

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/nightly.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,14 @@ jobs:
166166
See more at https://github.com/docker-ruby-nightly/ruby/pkgs/container/ruby/versions?filters[version_type]=tagged
167167
EOT
168168
169+
- id: latest-release
170+
env:
171+
GH_TOKEN: ${{ github.token }}
172+
run: echo "latest_release=$(gh release list --limit 1 --json name --jq '.[].name')" >> $GITHUB_OUTPUT
173+
169174
- name: Create release
170-
if: github.event_name == 'schedule' || inputs.push == true
175+
# https://github.com/ruby/actions/actions/workflows/snapshot-master.yml
176+
if: (github.event_name == 'schedule' || inputs.push == true) && steps.latest-release.outputs.latest_release != needs.set-up-matrix.outputs.date
171177
env:
172178
GH_TOKEN: ${{ github.token }}
173179
run: gh release create ${{ needs.set-up-matrix.outputs.date }} --title="${{ needs.set-up-matrix.outputs.date }}" --notes-file=notes.txt

0 commit comments

Comments
 (0)