-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
86bdfd1
commit 7eab211
Showing
7 changed files
with
196 additions
and
45 deletions.
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,37 @@ | ||
# Not supported due to compatibility issues with Bun Http2 stdlib | ||
name: Bun Main Workflow | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Version' | ||
required: true | ||
|
||
jobs: | ||
run-bun-script: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: CI | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Bun | ||
uses: oven-sh/setup-bun@v2 | ||
with: | ||
version: '1.1.18' | ||
|
||
- name: Install Dependencies | ||
run: bun install | ||
|
||
- name: Run Bun Script - Update | ||
if: github.event_name == 'workflow_dispatch' | ||
run: bun run index.ts '${{ toJSON(secrets) }}' '${{ toJSON(github.event) }}' update | ||
|
||
- name: Run Bun Script - Push | ||
if: github.event_name == 'push' | ||
run: bun run index.ts '${{ toJSON(secrets) }}' '${{ toJSON(github.event) }}' push |
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 @@ | ||
# Not supported due to compatibility issues with Bun Http2 stdlib | ||
name: Node Main Workflow | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Version' | ||
required: true | ||
|
||
jobs: | ||
run-node-script: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: CI | ||
steps: | ||
- name: Checkout Action | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node Action | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20' | ||
|
||
- name: Install Dependencies | ||
run: yarn install | ||
|
||
- name: Run Node Script - Update | ||
if: github.event_name == 'workflow_dispatch' | ||
run: yarn tsx index.ts '${{ toJSON(secrets) }}' '${{ toJSON(github.event) }}' update | ||
|
||
- name: Run Node Script - Push | ||
if: github.event_name == 'push' | ||
run: yarn tsx index.ts '${{ toJSON(secrets) }}' '${{ toJSON(github.event) }}' push |
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,32 +1,37 @@ | ||
name: Bun Script Execution | ||
# Not supported due to compatibility issues with Bun Http2 stdlib | ||
name: Bun Main Workflow | ||
|
||
on: | ||
#push: # Trigger on push events to master branch (you can adjust this trigger) | ||
workflow_dispatch: # Trigger on manual workflow dispatch | ||
|
||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Version' | ||
required: true | ||
|
||
jobs: | ||
run-bun-script: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: CI | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Bun | ||
uses: oven-sh/setup-bun@v2 | ||
with: | ||
version: '1.1.18' | ||
|
||
- name: Get Parameters (for push event) | ||
if: github.event_name == 'push' | ||
run: | | ||
# No parameters are automatically provided on push events | ||
echo "No parameters provided on push event." | ||
- name: Get Parameters (for manual trigger) | ||
- name: Install Dependencies | ||
run: bun install | ||
|
||
- name: Run Bun Script - Update | ||
if: github.event_name == 'workflow_dispatch' | ||
run: | | ||
PARAM_VALUE_1=${{ github.event.inputs.param1 }} | ||
PARAM_VALUE_2=${{ github.event.inputs.param2 }} | ||
# ... add more parameter retrieval as needed | ||
# Use empty strings if parameters are not provided | ||
run: bun run index.ts '${{ toJSON(secrets) }}' '${{ toJSON(github.event) }}' update | ||
|
||
- name: Run Bun Script | ||
run: bun run index.ts --param1 $PARAM_VALUE_1 --param2 $PARAM_VALUE_2 | ||
# Adjust the command based on your parameter names and flags | ||
- name: Run Bun Script - Push | ||
if: github.event_name == 'push' | ||
run: bun run index.ts '${{ toJSON(secrets) }}' '${{ toJSON(github.event) }}' push |
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,15 +1,3 @@ | ||
# ci | ||
# CI | ||
|
||
To install dependencies: | ||
|
||
```bash | ||
bun install | ||
``` | ||
|
||
To run: | ||
|
||
```bash | ||
bun run index.ts | ||
``` | ||
|
||
This project was created using `bun init` in bun v1.1.7. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. | ||
Pacakge to run CI/CD pipelines for the project. |
Binary file not shown.
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
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