Skip to content

Commit

Permalink
ci: move checkout action out reusable workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ayuhito committed Jun 22, 2024
1 parent 74e8e7d commit 973e232
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ jobs:
os: [ubuntu-latest, macos-latest]
arch: [amd64, arm64]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Environment
uses: ./.github/workflows/setup-env.yml

Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/setup-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,15 @@ on:
jobs:
setup:
runs-on: ubuntu-latest
outputs:
checkout-path: ${{ steps.checkout.outputs.path }}
steps:
- name: Checkout code
id: checkout
uses: actions/checkout@v4

- name: Install Task
uses: arduino/setup-task@v2

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: ${{ steps.checkout.outputs.path }}/core/go.mod
cache-dependency-path: ${{ steps.checkout.outputs.path }}/core/go.sum
go-version-file: ./core/go.mod
cache-dependency-path: ./core/go.sum

- name: Setup Bun
uses: oven-sh/setup-bun@v1
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Environment
uses: ./.github/workflows/setup-env.yml

Expand All @@ -24,6 +27,9 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Environment
uses: ./.github/workflows/setup-env.yml

Expand Down

0 comments on commit 973e232

Please sign in to comment.