Skip to content

Commit

Permalink
Automatically create release
Browse files Browse the repository at this point in the history
  • Loading branch information
Earlopain committed Nov 12, 2024
1 parent a7ada0c commit ad41ce6
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
- cron: 0 20 * * *

permissions:
contents: read
contents: write
packages: write

env:
Expand Down Expand Up @@ -148,6 +148,25 @@ jobs:
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
- name: Inspect image
release:
runs-on: ubuntu-latest
needs:
- set-up-matrix
- build
- merge
if: success() || failure()

steps:
- name: Create release notes
run: |
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}
cat <<EOT >> notes.txt
${{ needs.build.result != 'success' && 'There were one or more build failures' || '' }}
See more at https://github.com/docker-ruby-nightly/ruby/pkgs/container/ruby/versions?filters%5Bversion_type%5D=tagged
EOT
- name: Create release
if: github.event_name == 'schedule' || inputs.push == true
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 ad41ce6

Please sign in to comment.