Skip to content
Open
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
26 changes: 26 additions & 0 deletions .github/workflows/release-tag-trigger.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Tag Release Notification

on:
push:
tags:
- 'v*'
- 'release-*'

jobs:
notify-website:
runs-on: ubuntu-latest
steps:
- name: Trigger website import
run: |
RELEASE_TAG=${GITHUB_REF#refs/tags/}
echo "New tag created: $RELEASE_TAG"

# Extract version number from tag (e.g., v1.15.0 -> 1.15.0)
VERSION=$(echo "$RELEASE_TAG" | sed -E 's/^v?([0-9]+\.[0-9]+\.[0-9]+).*/\1/')

# Trigger workflow dispatch in openeverest.github.io
curl -X POST \
-H "Authorization: token ${{ secrets.EVEREST_WEBSITE_TOKEN }}" \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will not reveal the token in workflow run history right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's recommended way to use secrets by github (https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/use-secrets). But, we will need someone to add a token to secrets to this repo, probably @recharte can help us with this later

-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/openeverest/openeverest.github.io/actions/workflows/import-docs.yml/dispatches \
-d "{\"ref\":\"main\",\"inputs\":{\"version\":\"$VERSION\"}}"