https://github.com/bit-tasks/lane-cleanup
Cleanup Bit lanes created by the `bit-tasks/pull-request@v1` task.
https://github.com/bit-tasks/lane-cleanup
Last synced: 4 months ago
JSON representation
Cleanup Bit lanes created by the `bit-tasks/pull-request@v1` task.
- Host: GitHub
- URL: https://github.com/bit-tasks/lane-cleanup
- Owner: bit-tasks
- Created: 2023-08-30T05:03:22.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-18T06:03:50.000Z (over 1 year ago)
- Last Synced: 2024-10-18T06:06:51.164Z (over 1 year ago)
- Language: TypeScript
- Size: 519 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Cleanup Bit Lanes for CI/CD Pipelines
Cleanup Bit lanes created by the `bit-tasks/pull-request@v1` task.
# GitHub Actions
This task removes the Bit lanes created by the `bit-tasks/pull-request@v1` task after the pull request is merged.
## Inputs
### `ws-dir`
**Optional** The workspace directory path from the root. Default `"Dir specified in Init Task or ./"`.
### `archive`
**Optional** If set to `true`, the lane will be archived rather than permanently deleted.
## Example usage
**Note:** Use `bit-task/init@v1` as a prior step in your action before running `bit-tasks/lane-cleanup@v1`.
```yaml
name: Test Bit Lane Cleanup
on:
pull_request:
types:
- closed
jobs:
build:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_USER_NAME: ${{ secrets.GIT_USER_NAME }}
GIT_USER_EMAIL: ${{ secrets.GIT_USER_EMAIL }}
BIT_CLOUD_ACCESS_TOKEN: ${{ secrets.BIT_CLOUD_ACCESS_TOKEN }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Initialize Bit
uses: bit-tasks/init@v1
with:
ws-dir: ''
- name: Bit Lane Cleanup
uses: bit-tasks/lane-cleanup@v1
```
# Contributor Guide
Steps to create custom tasks in different CI/CD platforms.
## GitHub Actions
Go to the GithHub action task directory and build using NCC compiler. For example;
```
npm install
npm run build
git commit -m "Update task"
git tag -a -m "action release" v1 --force
git push --follow-tags
```
For more information, refer to [Create a javascript action](https://docs.github.com/en/actions/creating-actions/creating-a-javascript-action)