Skip to content

Commit

Permalink
setting up runs-on as a parameter to check-go-mod
Browse files Browse the repository at this point in the history
  • Loading branch information
jmurret committed Mar 27, 2023
1 parent 70eaee2 commit 85b7e5a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/build-distros.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,26 @@ permissions:
contents: read

jobs:
setup:
name: Setup
runs-on: ubuntu-latest
outputs:
compute-small: ${{ steps.setup-outputs.outputs.compute-small }}
compute-medium: ${{ steps.setup-outputs.outputs.compute-medium }}
compute-large: ${{ steps.setup-outputs.outputs.compute-medium }}
compute-xl: ${{ steps.setup-outputs.outputs.compute-xl }}
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
- id: setup-outputs
name: Setup outputs
run: ./.github/scripts/get_runner_classes.sh

check-go-mod:
needs:
- setup
uses: ./.github/workflows/reusable-check-go-mod.yml
with:
runs-on: ${{ needs.setup.outputs.compute-medium }}

build-386:
needs: check-go-mod
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/reusable-check-go-mod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,19 @@ name: check-go-mod

on:
workflow_call:

inputs:
uploaded-binary-name:
required: false
type: string
default: "consul-bin"
runs-on:
description: An expression indicating which kind of runners to use.
required: false
type: string
default: '["custom", "linux", "small"]'
jobs:
check-go-mod:
runs-on: ubuntu-latest
runs-on: ${{ fromJSON(inputs.runs-on) }}

steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
Expand Down

0 comments on commit 85b7e5a

Please sign in to comment.