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

feat: remove gha cache after branch got deleted #201

Merged
merged 2 commits into from
Jun 26, 2023

Conversation

kylemocode
Copy link
Contributor

@kylemocode kylemocode commented Jun 23, 2023

Why need this change? / Root cause:

  • As Github Actions have size limit for cache (10 GB per free repo) and artifact (500 MB per free repo), we can manually clean the unused storage by ourself (Although gha will remove the unused resource automatically, but the interval might be too long. ex: for artifacts, it will exist 90 days)
  • currently, we will upload build content and LHCI report as artifacts
截圖 2023-06-23 上午10 57 30
  • I think LHCI report is unnecessary so I remove it from config
  • I change the artifacts name using PR number so that we can identify them when we want to delete them
  • create a workflow which will trigger when PR got closed, it will remove the dependency cache of the PR branch and remove the artifacts created by the PR
  • by this way, we can make sure that we will not exceed the size limit easily
  • also add concurrent group so that when a PR trigger multiple CI workflow, it will cancel the previous one, making sure the queue have enough capacity and will not queue other tasks (like image below)
截圖 2023-06-23 下午4 29 36

Changes made:

Test Scope / Change impact:

Issue

@kylemocode kylemocode force-pushed the feat/cleanup-cache-after-merge branch from 426fe98 to 839b91c Compare June 23, 2023 08:35
@kylemocode kylemocode changed the title [WIP] feat: remove gha cache after branch got deleted feat: remove gha cache after branch got deleted Jun 23, 2023
@kylemocode kylemocode requested a review from Parkerhiphop June 23, 2023 09:15
@GaaSBot
Copy link

GaaSBot commented Jun 25, 2023

Knip Scan Result for 60bce98

Unused files (8)
Unused files (8)
.bundlewatch.config.js
components/shared/Modal/index.tsx
components/shared/Modalow/Example.tsx
components/shared/Toast/CtxToastQueue.tsx
lighthouserc.js
mocks/rooms.ts
scripts/knipScanReporter.js
scripts/lhciScanReporter.js
Unused dependencies (3)
Unused dependencies (3)
@svgr/webpack package.json
sharp package.json
swr package.json
Unused devDependencies (4)
Unused devDependencies (4)
@actions/github package.json
@octokit/core package.json
@storybook/blocks package.json
@storybook/testing-library package.json
Unused exports (3)
Unused exports (3)
RoomsListTitle components/rooms/RoomsList.tsx
setFlags components/shared/Modal/ModalManager/src/ModalManagerBase.tsx
createNicknameEndpoint requests/users/index.ts
Unused exports in namespaces (7)
Unused exports in namespaces (7)
dotSizeVariants components/shared/Badge/Badge.tsx
textSizeVariants components/shared/Badge/Badge.tsx
INITIAL_TOAST_POSITION components/shared/Toast/ToastQueueContext.tsx
MAX_TOAST_MOUNT_SIZE components/shared/Toast/ToastQueueContext.tsx
MAX_TOAST_QUEUE_SIZE components/shared/Toast/ToastQueueContext.tsx
TOAST_QUEUE_STATE components/shared/Toast/ToastQueueContext.tsx
ToastQueueContext components/shared/Toast/ToastQueueContext.tsx
Unused exported types (23)
Unused exported types (23)
GameListProp interface components/lobby/CreateRoomModal/GameListModal/GameList/index.tsx
GroupedGamesType type components/lobby/CreateRoomModal/GameListModal/GameList/index.tsx
RoomBreadcrumbType type components/rooms/RoomBreadcrumb.tsx
RoomButtonGroupProps type components/rooms/RoomButtonGroup.tsx
RoomChatroom type components/rooms/RoomChatroom/RoomChatroom.tsx
RoomUserCardListProps type components/rooms/RoomUserCardList/RoomUserCardList.tsx
DisabledUserCardProp interface components/rooms/RoomUserCardList/UserCard/UserCard.tsx
WatingUserCardProp interface components/rooms/RoomUserCardList/UserCard/UserCard.tsx
CarouselArrowButtonProps interface components/shared/Carousel/CarouselArrowButton.tsx
CarouselItemProps interface components/shared/Carousel/CarouselItem.tsx
CoverProps interface components/shared/Cover/index.tsx
IconProps type components/shared/Icon/Icon.tsx
BodyProps interface components/shared/Modalow/Body.tsx
FooterProps interface components/shared/Modalow/Footer.tsx
HeaderProps interface components/shared/Modalow/Header.tsx
MaskProps interface components/shared/Modalow/Mask.tsx
PortalProps interface components/shared/Modalow/Portal.tsx
SOCKET_EVENT enum hooks/useChatroom.ts
WS_ReadyState enum hooks/useChatroom.ts
CookieKey enum hooks/useCookie.ts
Game type requests/rooms/index.ts
PageMeta type requests/rooms/index.ts
RoomEntry type requests/rooms/index.ts
Unused exported types in namespaces (32)
Unused exported types in namespaces (32)
AvatarButtonProps interface components/shared/Avatar/Avatar.tsx
AvatarImageProps interface components/shared/Avatar/Avatar.tsx
AvatarLinkProps interface components/shared/Avatar/Avatar.tsx
AvatarProps type components/shared/Avatar/Avatar.tsx
AvatarShape type components/shared/Avatar/Avatar.tsx
AvatarSizeType type components/shared/Avatar/Avatar.tsx
AvatarType type components/shared/Avatar/Avatar.tsx
BaseAvatarProps interface components/shared/Avatar/Avatar.tsx
BadgePositionVariant enum components/shared/Badge/Badge.tsx
BadgeProps interface components/shared/Badge/Badge.tsx
BadgeSizeVariant enum components/shared/Badge/Badge.tsx
BaseButtonProps interface components/shared/Button/Button.tsx
ButtonProps type components/shared/Button/Button.tsx
CarouselProps interface components/shared/Carousel/Carousel.tsx
InputProps interface components/shared/Input/Input.tsx
ModalSizeVariant enum components/shared/Modalow/Modalow.tsx
SearchBarProps interface components/shared/SearchBar/SearchBar.tsx
SubmitHandler type components/shared/SearchBar/SearchBar.tsx
TabProps interface components/shared/Tabs/Tab.tsx
TabSizeType type components/shared/Tabs/Tabs.tsx
TagProps interface components/shared/Tag/Tag.tsx
ToastPropLength type components/shared/Toast/Toast.tsx
ToastPropRounded type components/shared/Toast/Toast.tsx
ToastPropSize type components/shared/Toast/Toast.tsx
ToastPropState type components/shared/Toast/Toast.tsx
CtxToastQueueProviderProps interface components/shared/Toast/ToastQueueContext.tsx
CtxToastQueueValue interface components/shared/Toast/ToastQueueContext.tsx
ToastQueueMap type components/shared/Toast/ToastQueueContext.tsx
ToastQueueMapValue type components/shared/Toast/ToastQueueContext.tsx
ToastQueueState type components/shared/Toast/ToastQueueContext.tsx
ToastQueueValue type components/shared/Toast/ToastQueueContext.tsx
UseToast interface components/shared/Toast/useToast.tsx
Duplicate exports (10)
Duplicate exports (10)
RoomChatroom, default components/rooms/RoomChatroom/RoomChatroom.tsx
Badge, default components/shared/Badge/Badge.tsx
Button, default components/shared/Button/Button.tsx
Input, default components/shared/Input/Input.tsx
Body, default components/shared/Modalow/Body.tsx
Footer, default components/shared/Modalow/Footer.tsx
Header, default components/shared/Modalow/Header.tsx
Mask, default components/shared/Modalow/Mask.tsx
Modalow, default components/shared/Modalow/Modalow.tsx
SearchBar, default components/shared/SearchBar/SearchBar.tsx
Configuration issues (1)
Configuration issues (1)
Unused item in ignoreDependencies: @next/bundle-analyzer

@GaaSBot
Copy link

GaaSBot commented Jun 25, 2023

🤖 Lighthouse Scan Result for 60bce98

/rooms
Metric Value
Performance 69
Seo 80
Accessibility 78
HTML Report for LHCI Scan Report Link
/rooms/abc
Metric Value
Performance 76
Seo 80
Accessibility 67
HTML Report for LHCI Scan Report Link
/login
Metric Value
Performance 51
Seo 80
Accessibility 94
HTML Report for LHCI Scan Report Link

@Parkerhiphop Parkerhiphop merged commit 9809fa8 into main Jun 26, 2023
@Parkerhiphop Parkerhiphop deleted the feat/cleanup-cache-after-merge branch June 26, 2023 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants