diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3e369646..c5a81ee7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,10 +13,8 @@ on: tags: - 'v*' pull_request: - branches: - - 'master' - - 'v[0-9]*' paths-ignore: + - '.github/releases.json' - 'README.md' - 'docs/**' diff --git a/.github/workflows/docs-upstream.yml b/.github/workflows/docs-upstream.yml index 85027678..60b9dc8a 100644 --- a/.github/workflows/docs-upstream.yml +++ b/.github/workflows/docs-upstream.yml @@ -19,6 +19,8 @@ on: paths: - '.github/workflows/docs-upstream.yml' - 'docs/**' + paths-ignore: + - '.github/releases.json' jobs: docs-yaml: diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 5acfa0dc..e7eac1ee 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -11,10 +11,8 @@ on: - 'master' - 'v[0-9]*' pull_request: - branches: - - 'master' - - 'v[0-9]*' paths-ignore: + - '.github/releases.json' - 'README.md' - 'docs/**' diff --git a/.github/workflows/releases-json.yml b/.github/workflows/releases-json.yml new file mode 100644 index 00000000..2e09a06b --- /dev/null +++ b/.github/workflows/releases-json.yml @@ -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 diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index b3374979..1c6d636a 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -13,9 +13,8 @@ on: tags: - 'v*' pull_request: - branches: - - 'master' - - 'v[0-9]*' + paths-ignore: + - '.github/releases.json' jobs: validate: