Skip to content

Commit

Permalink
Don't make release when source has not changed
Browse files Browse the repository at this point in the history
Sometimes the archive still points to previous days.
Trying to make a release twice will error
  • Loading branch information
Earlopain committed Nov 14, 2024
1 parent 5bbcd5a commit 2571d61
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,14 @@ jobs:
See more at https://github.com/docker-ruby-nightly/ruby/pkgs/container/ruby/versions?filters[version_type]=tagged
EOT
- id: latest-release
env:
GH_TOKEN: ${{ github.token }}
run: echo "latest_release=$(gh release list --limit 1 --json name --jq '.[].name')" >> $GITHUB_OUTPUT

- name: Create release
if: github.event_name == 'schedule' || inputs.push == true
# https://github.com/ruby/actions/actions/workflows/snapshot-master.yml
if: (github.event_name == 'schedule' || inputs.push == true) && steps.latest-release.outputs.latest_release != needs.set-up-matrix.outputs.date
env:
GH_TOKEN: ${{ github.token }}
run: gh release create ${{ needs.set-up-matrix.outputs.date }} --title="${{ needs.set-up-matrix.outputs.date }}" --notes-file=notes.txt

0 comments on commit 2571d61

Please sign in to comment.