Skip to content

Commit

Permalink
Abstract install-go action
Browse files Browse the repository at this point in the history
  • Loading branch information
richardpringle committed Apr 29, 2024
1 parent 7e8f098 commit e6eb6e3
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 18 deletions.
18 changes: 18 additions & 0 deletions .github/actions/install-go/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: 'Install Go toolchain with defaults'
description: 'Install a go toolchain with defaults'

inputs:
cache:
description: "to cache or not to cache, that is the question"
required: false
default: "true"

runs:
using: composite
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
check-latest: true
cache: ${{ inputs.cache }}
24 changes: 6 additions & 18 deletions .github/workflows/rust-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
check-latest: true
cache: true
- name: Install Go
uses: ./.github/actions/install-go
- name: Install Rust
uses: ./.github/actions/install-rust
with:
Expand All @@ -50,12 +46,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
check-latest: true
cache: true
- name: Install Go
uses: ./.github/actions/install-go
- name: Install Rust
uses: ./.github/actions/install-rust
with:
Expand All @@ -69,12 +61,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
check-latest: true
cache: true
- name: Install Go
uses: ./.github/actions/install-go
- name: Install Rust
uses: ./.github/actions/install-rust
with:
Expand Down

0 comments on commit e6eb6e3

Please sign in to comment.