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

Workflow to sync changelog with Seqera docs #761

Merged
merged 1 commit into from
Nov 29, 2024
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
61 changes: 61 additions & 0 deletions .github/workflows/seqera_docs_changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Push changelog to Seqera Docs
on:
release:
types: [published]
workflow_dispatch:
inputs:
release_name:
description: 'Release version (e.g. 1.0.0)'
vladsavelyev marked this conversation as resolved.
Show resolved Hide resolved
required: true
release_body:
description: 'Release changelog content'
required: true

jobs:
update-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Clone seqeralabs/docs
run: |
git clone https://github.com/seqeralabs/docs.git seqeralabs-docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create changelog file
run: |
mkdir -p seqeralabs-docs/changelog/wave
cat << EOF > seqeralabs-docs/changelog/wave/${{ github.event.release.name || inputs.release_name }}.mdx
---
title: Wave ${{ github.event.release.name || inputs.release_name }}
date: $(date +%Y-%m-%d)
tags: [wave]
---

${{ github.event.release.body || inputs.release_body }}
EOF

- uses: actions/create-github-app-token@v1
id: generate-token
with:
app-id: ${{ secrets.DOCS_BOT_APP_ID }}
private-key: ${{ secrets.DOCS_BOT_APP_PRIVATE_KEY }}
owner: seqeralabs
repositories: docs

- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ steps.generate-token.outputs.token }}
branch-token: ${{ steps.generate-token.outputs.token }}
vladsavelyev marked this conversation as resolved.
Show resolved Hide resolved
path: seqeralabs-docs
commit-message: "Changelog: Wave ${{ github.event.release.name }}"
title: "Changelog: Wave ${{ github.event.release.name }}"
body: |
This PR adds the changelog for Wave ${{ github.event.release.name }} to the Seqera documentation.

This is an automated PR created from the Wave repository.
branch: changelog-wave-${{ github.event.release.name }}
base: master
delete-branch: true
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,6 @@ deployment-url.txt
tsp-output/
node_modules/
package-lock.json

# Seqera Docs clone
seqeralabs-docs