Skip to content

Commit 5bbcd5a

Browse files
committed
Automatically create release
1 parent a7ada0c commit 5bbcd5a

1 file changed

Lines changed: 23 additions & 3 deletions

File tree

.github/workflows/nightly.yml

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
- cron: 0 20 * * *
1212

1313
permissions:
14-
contents: read
14+
contents: write
1515
packages: write
1616

1717
env:
@@ -148,6 +148,26 @@ jobs:
148148
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
149149
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
150150
151-
- name: Inspect image
151+
release:
152+
runs-on: ubuntu-latest
153+
needs:
154+
- set-up-matrix
155+
- build
156+
- merge
157+
if: success() || failure()
158+
159+
steps:
160+
- uses: actions/checkout@v4
161+
- name: Create release notes
152162
run: |
153-
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}
163+
cat <<EOT >> notes.txt
164+
${{ needs.build.result != 'success' && 'There were one or more build failures' || '' }}
165+
166+
See more at https://github.com/docker-ruby-nightly/ruby/pkgs/container/ruby/versions?filters[version_type]=tagged
167+
EOT
168+
169+
- name: Create release
170+
if: github.event_name == 'schedule' || inputs.push == true
171+
env:
172+
GH_TOKEN: ${{ github.token }}
173+
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)