-
Notifications
You must be signed in to change notification settings - Fork 638
build: add a CI flow for Embedded UI refresh #1321
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
build: add a CI flow for Embedded UI refresh #1321
Conversation
Hi! Thank you for contributing! |
ASSET_NAME: ${{ github.event.inputs && github.event.inputs.asset_name || github.event.client_payload.asset_name }} | ||
REPOSITORY: ${{ github.event.inputs && github.event.inputs.repository || github.event.client_payload.repository }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will values form client_payload
will ever be applied, while inputs.asset_name
and inputs.repository
have default values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mkdir $TARGET_DIR | ||
mv -vf $TEMP_ASSET_DIR/$ASSET_NAME/* $TARGET_DIR | ||
|
||
NEW_RESOURCES=$(find $TARGET_DIR -type f | grep -v '.map' | sort) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the initial instruction also *. LICENSE *
files were excluded
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Decided that we need to keep these files in order to comply with all licenses.
Also I removed .map
filter because there are no any source maps in the build.
delete-branch: true | ||
title: "build: refresh Embedded UI (${{ env.TAG_NAME }})" | ||
body: | | ||
### Embedded UI Refresh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't it be considered as a comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to me that it won't, because it comes after |
.
INDENTATION=$(grep -e "$START_POINTER" $YA_MAKE_FILE | perl -lane 's/^(\s+)(.*)+$/$1/e; print') | ||
|
||
perl -0777 -pi -e "s/\s+$START_POINTER.*$END_POINTER/ | ||
$INDENTATION$START_POINTER | ||
${INDENTATION}RESOURCE( | ||
$(echo "$NEW_RESOURCES" | perl -e "while (<>) {chomp; print \"$INDENTATION \$_ \$_\\n\";}" | sed -E 's/\//\\\//g') | ||
$INDENTATION) | ||
$INDENTATION$END_POINTER/s" $YA_MAKE_FILE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add some comment, that will explain this script?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
- uses: actions/checkout@v4 | ||
- name: Asset Download | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the difference between GITHUB_TOKEN
and YDB_PLATFORM_BOT_TOKEN_REPO
(used in ydb-embedded-ui workflows)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
secrets.GITHUB_TOKEN
is a default token that is provided by GitHub for any workflow. I found that it used also in docs_preview
workflow.
No idea why secrets.GITHUB_TOKEN
didn't use in ydb-embedded-ui
for opening PRs.
Changelog entry
Add a CI flow for Embedded UI refresh.
Changelog category