-
Notifications
You must be signed in to change notification settings - Fork 6
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
fix: adding workflows for the repository #30
Merged
Merged
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
26eed0d
fix: adding workflows for the repository
abhimanyubabbar adae220
fix: added more workflows
abhimanyubabbar 3d9b1cb
fix: update the node version
abhimanyubabbar d51c4ad
fix: update the index.js
abhimanyubabbar ae0f23c
chore: some more changes to build the dist
abhimanyubabbar 3b4d8b0
chore: update the package json with build command without cache
abhimanyubabbar 5611d21
chore: rebuilt the dist file
abhimanyubabbar 4ab504d
chore: move towards node v20 when executing the action
abhimanyubabbar f83e32b
chore: remove the engine from package.json
abhimanyubabbar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Check dist | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- "**.md" | ||
pull_request: | ||
paths-ignore: | ||
- "**.md" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
check-dist: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
|
||
- name: Set Node.js 20.14.x | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.14.x | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Rebuild the index.js file | ||
run: npm run build | ||
|
||
- name: Compare the expected and actual dist/ directories | ||
run: | | ||
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then | ||
echo "Detected uncommitted changes after build. See status below:" | ||
git diff | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Lint Commit Messages | ||
on: [pull_request] | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: read | ||
|
||
jobs: | ||
commitlint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: wagoid/commitlint-github-action@v6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
on: | ||
push: | ||
branches: | ||
- "main" | ||
name: release-please | ||
jobs: | ||
release-please: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Extract branch name | ||
shell: bash | ||
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" | ||
id: extract_branch | ||
- uses: google-github-actions/release-please-action@v3 | ||
with: | ||
token: ${{ secrets.PAT }} | ||
pull-request-title-pattern: "chore: release ${version}" | ||
release-type: node | ||
package-name: rudder-transformation-action | ||
default-branch: ${{ steps.extract_branch.outputs.branch }} | ||
changelog-types: '[{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"chore","section":"Miscellaneous","hidden":false},{"type":"refactor","section":"Miscellaneous","hidden":false},{"type":"test","section":"Miscellaneous","hidden":false},{"type":"doc","section":"Documentation","hidden":false}]' | ||
bump-minor-pre-major: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: "Semantic pull requests" | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
main: | ||
name: Validate PR title | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: amannn/action-semantic-pull-request@v4 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
types: | | ||
fix | ||
feat | ||
chore | ||
refactor | ||
exp | ||
doc | ||
test | ||
requireScope: false | ||
subjectPattern: ^(?![A-Z]).+$ | ||
subjectPatternError: | | ||
The subject "{subject}" found in the pull request title "{title}" | ||
didn't match the configured pattern. Please ensure that the subject | ||
doesn't start with an uppercase character. | ||
# For work-in-progress PRs you can typically use draft pull requests | ||
# from GitHub. However, private repositories on the free plan don't have | ||
# this option and therefore this action allows you to opt-in to using the | ||
# special "[WIP]" prefix to indicate this state. This will avoid the | ||
# validation of the PR title and the pull request checks remain pending. | ||
# Note that a second check will be reported if this is enabled. | ||
wip: true | ||
# When using "Squash and merge" on a PR with only one commit, GitHub | ||
# will suggest using that commit message instead of the PR title for the | ||
# merge commit, and it's easy to commit this by mistake. Enable this option | ||
# to also validate the commit message for one commit PRs. | ||
validateSingleCommit: true | ||
# Related to `validateSingleCommit` you can opt-in to validate that the PR | ||
# title matches a single commit to avoid confusion. | ||
validateSingleCommitMatchesPrTitle: true | ||
# If the PR contains one of these labels, the validation is skipped. | ||
# Multiple labels can be separated by newlines. | ||
# If you want to rerun the validation when labels change, you might want | ||
# to use the `labeled` and `unlabeled` event triggers in your workflow. | ||
ignoreLabels: | | ||
bot | ||
dependencies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
node_modules/ | ||
package-lock.json | ||
.env | ||
.env | ||
coverage/ | ||
test-outputs/ |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
name: 'Rudder Transformation Action' | ||
description: 'Tests transformations and libraries from your repo and publishes them to your Rudderstack workspace' | ||
name: "Rudder Transformation Action" | ||
description: "Tests transformations and libraries from your repo and publishes them to your Rudderstack workspace" | ||
branding: | ||
icon: activity | ||
color: purple | ||
icon: activity | ||
color: purple | ||
inputs: | ||
metaPath: | ||
description: 'File containing metadata about transformation and libraries' | ||
required: true | ||
email: | ||
description: 'Owner email of the workspace' | ||
required: true | ||
accessToken: | ||
description: 'accessToken generated for a workspace' | ||
required: true | ||
serverEndpoint: | ||
description: 'backend url' | ||
required: false | ||
default: 'https://api.rudderstack.com' | ||
uploadTestArtifact: | ||
description: 'Toggle for enabling artifacts' | ||
required: false | ||
metaPath: | ||
description: "File containing metadata about transformation and libraries" | ||
required: true | ||
email: | ||
description: "Owner email of the workspace" | ||
required: true | ||
accessToken: | ||
description: "accessToken generated for a workspace" | ||
required: true | ||
serverEndpoint: | ||
description: "backend url" | ||
required: false | ||
default: "https://api.rudderstack.com" | ||
uploadTestArtifact: | ||
description: "Toggle for enabling artifacts" | ||
required: false | ||
runs: | ||
using: 'node12' | ||
main: 'dist/index.js' | ||
using: "node20" | ||
main: "dist/index.js" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module.exports = { | ||
extends: ["@commitlint/config-conventional"], | ||
rules: { | ||
"type-enum": () => [ | ||
2, | ||
"always", | ||
["fix", "feat", "chore", "refactor", "docs", "test"], | ||
], | ||
}, | ||
}; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
is this required ?