Skip to content

Commit 61e11a9

Browse files
committed
chore(workflows): improve reusable workflows
1 parent 71c97c9 commit 61e11a9

9 files changed

Lines changed: 29 additions & 40 deletions

File tree

.github/workflows/reusable-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ on:
2222
jobs:
2323
build:
2424
name: Building
25-
uses: aether-development/.github/.github/workflows/reusable-bun-job.yml@main
25+
uses: aether-development/.github/workflows/reusable-bun-job.yml@main
2626
with:
2727
script-name: build
2828
operating-system: ${{ inputs.operating-system }}

.github/workflows/reusable-bun-job.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,14 @@ jobs:
3737
with:
3838
submodules: ${{ inputs.with-submodules }}
3939

40-
- name: Install Dependencies
41-
uses: aether-development/.github/actions/install-bun-dependencies@main
40+
- name: Setup Bun
41+
uses: oven-sh/setup-bun@v1
4242
with:
4343
bun-version: ${{ inputs.bun-version }}
4444

45+
- name: Install Dependencies
46+
run: bun install --frozen-lockfile
47+
4548
- name: Run Script
4649
run: bun run ${{ inputs.script-name }}
4750
env:

.github/workflows/reusable-continuous-delivery.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,15 @@ jobs:
9393
fi
9494
fi
9595
96-
- name: Install Dependencies
97-
uses: aether-development/.github/actions/install-bun-dependencies@main
96+
- name: Setup Bun
97+
uses: oven-sh/setup-bun@v1
9898
with:
9999
bun-version: ${{ inputs.bun-version }}
100100

101+
- name: Install Dependencies
102+
working-directory: ${{ inputs.working-directory }}
103+
run: bun install --frozen-lockfile
104+
101105
- name: Build
102106
if: ${{ inputs.build }}
103107
run: bun run build

.github/workflows/reusable-dependabot-actions.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ on:
88
required: false
99
default: ubuntu-latest
1010
type: string
11-
repo:
12-
description: The repo-owner/repo string for the repository filter
13-
required: true
14-
type: string
1511

1612
permissions:
1713
contents: write
@@ -21,7 +17,7 @@ jobs:
2117
dependabot:
2218
name: Actions
2319
runs-on: ${{ inputs.operating-system}}
24-
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == inputs.repo
20+
if: github.event.pull_request.user.login == 'dependabot[bot]'
2521
steps:
2622
- name: Dependabot Metadata
2723
id: metadata

.github/workflows/reusable-labelsync.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ jobs:
4747
repository: ${{ inputs.repository-overwrite-labels }}
4848
submodules: ${{ inputs.with-submodules }}
4949

50+
- name: Install yq
51+
if: inputs.merge-labels == true
52+
run: |
53+
sudo wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq
54+
sudo chmod +x /usr/bin/yq
55+
5056
- name: Merge labels
5157
if: inputs.merge-labels == true
5258
run: |

.github/workflows/reusable-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ on:
2222
jobs:
2323
lint:
2424
name: Linting
25-
uses: aether-development/.github/.github/workflows/reusable-bun-job.yml@main
25+
uses: aether-development/.github/workflows/reusable-bun-job.yml@main
2626
with:
2727
script-name: lint --fix=false
2828
operating-system: ${{ inputs.operating-system }}

.github/workflows/reusable-prettier.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ on:
2222
jobs:
2323
prettier:
2424
name: Prettier Checking
25-
uses: aether-development/.github/.github/workflows/reusable-bun-job.yml@main
25+
uses: aether-development/.github/workflows/reusable-bun-job.yml@main
2626
with:
2727
script-name: format:check
2828
operating-system: ${{ inputs.operating-system }}

.github/workflows/reusable-publish.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,15 @@ jobs:
9696
GITHUB_EMAIL: aether-development+github-actions[bot]@users.noreply.github.com
9797
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9898

99-
- name: Install Dependencies
100-
uses: aether-development/.github/actions/install-bun-dependencies@main
99+
- name: Setup Bun
100+
uses: oven-sh/setup-bun@v1
101101
with:
102102
bun-version: ${{ inputs.bun-version }}
103103

104+
- name: Install Dependencies
105+
working-directory: ${{ inputs.working-directory }}
106+
run: bun install --frozen-lockfile
107+
104108
- name: Build
105109
if: ${{ inputs.build }}
106110
run: bun run build
@@ -117,7 +121,7 @@ jobs:
117121
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
118122

119123
- name: Publish to NPM Registry
120-
if: ${{ inputs.registry == 'npm' }}
124+
if: ${{ inputs.registry == 'npm' || inputs.registry == 'both' }}
121125
working-directory: ${{ inputs.working-directory }}
122126
env:
123127
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -128,7 +132,7 @@ jobs:
128132
bun x npm publish --registry https://registry.npmjs.org/
129133
130134
- name: Publish to GitHub Registry
131-
if: ${{ inputs.registry == 'github' }}
135+
if: ${{ inputs.registry == 'github' || inputs.registry == 'both' }}
132136
working-directory: ${{ inputs.working-directory }}
133137
env:
134138
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

actions/install-bun-dependencies/action.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)