Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: generate releases.json on release event #1563

Merged
merged 2 commits into from
Jan 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
694 changes: 694 additions & 0 deletions .github/releases.json

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ on:
tags:
- 'v*'
pull_request:
branches:
- 'master'
- 'v[0-9]*'
paths-ignore:
- '.github/releases.json'
- 'README.md'
- 'docs/**'

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/docs-upstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ on:
paths:
- '.github/workflows/docs-upstream.yml'
- 'docs/**'
paths-ignore:
- '.github/releases.json'

jobs:
docs-yaml:
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ on:
- 'master'
- 'v[0-9]*'
pull_request:
branches:
- 'master'
- 'v[0-9]*'
paths-ignore:
- '.github/releases.json'
- 'README.md'
- 'docs/**'

Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/releases-json.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: releases-json

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
release:
types:
- released
pull_request:
paths-ignore:
- '.github/releases.json'

jobs:
generate:
uses: crazy-max/.github/.github/workflows/releases-json.yml@2a596c917a8ad3e6203ae99b777148525a2e00d5
with:
repository: docker/buildx
artifact_name: releases-json
filename: releases.json
secrets: inherit

open-pr:
runs-on: ubuntu-22.04
if: github.event_name == 'release'
needs:
- generate
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Download
uses: actions/download-artifact@v3
with:
name: releases-json
path: .github
-
name: Commit changes
run: |
git add -A .
-
name: Create PR
uses: peter-evans/create-pull-request@2b011faafdcbc9ceb11414d64d0573f37c774b04
with:
base: master
branch: releases-json/${{ github.event.release.name }}
commit-message: "github: update .github/releases.json"
signoff: true
delete-branch: true
title: "Update `.github/releases.json`"
body: |
Update `.github/releases.json` to keep in sync with GitHub Releases.
draft: false
5 changes: 2 additions & 3 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ on:
tags:
- 'v*'
pull_request:
branches:
- 'master'
- 'v[0-9]*'
paths-ignore:
- '.github/releases.json'

jobs:
validate:
Expand Down