Skip to content
Merged
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
24 changes: 24 additions & 0 deletions .github/workflows/build-cleanup.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: CI/CD (Clean up)

on:
pull_request:
types: [closed]
workflow_dispatch: ~

env:
SOURCE_BRANCH: ${{ github.head_ref || github.ref_name }}
RELEASE_BRANCH: "release/${{ github.head_ref || github.ref_name }}"

jobs:
clean-up:
name: Clean up
runs-on: [ubuntu-latest]
Copy link

Choose a reason for hiding this comment

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

Instead of using 'runs-on' attribute with an array, use a single value directly. This reduces complexity and enhances readability as 'runs-on' is expected to have a single value for the operating system. Change runs-on: [ubuntu-latest] to runs-on: ubuntu-latest.

steps:
- uses: actions/github-script@v7
with:
script: |
github.rest.git.deleteRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: "heads/${{ env.RELEASE_BRANCH }}",
});