Skip to content

Commit

Permalink
refactor: don't default earthly runner secret
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgilman committed Oct 12, 2023
1 parent 8f12ad9 commit 53628be
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/dogfood.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ jobs:
aws_role_arn: arn:aws:iam::332405224602:role/ci
aws_region: eu-central-1
earthly_version: 0.7.15
force_artifact: true
secrets:
earthly_runner_address: ${{ secrets.EARTHLY_SATELLITE_ADDRESS }}
earthly_runner_address: ${{ secrets.EARTHLY_SATELLITE_ADDRESS }}
earthly_runner_secret: ${{ secrets.EARTHLY_RUNNER_SECRET }}
11 changes: 9 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ on:
The address of the Earthly runner that will be used to build the
Earthly files.
required: false
earthly_runner_secret:
description: |
The ID of the AWS secret holding Earthly remote runner credentials.
This secret must contain the runner address and the necessary TLS
certificates required to authenticate with it. If omitted, a remote
Earthly runner will not be configured.
required: false


jobs:
discover:
Expand All @@ -51,8 +59,6 @@ jobs:
- name: Setup CI
uses: input-output-hk/catalyst-ci/actions/setup@setup-action
with:
aws_role_arn: ${{ inputs.aws_role_arn }}
aws_region: ${{ inputs.aws_region }}
earthly_version: ${{ inputs.earthly_version }}
- name: Discover Earthly files
uses: input-output-hk/catalyst-ci/actions/discover@master
Expand Down Expand Up @@ -87,6 +93,7 @@ jobs:
aws_role_arn: ${{ inputs.aws_role_arn }}
aws_region: ${{ inputs.aws_region }}
earthly_version: ${{ inputs.earthly_version }}
earthly_runner_secret: ${{ secrets.earthly_runner_secret }}
- name: Build artifact
uses: input-output-hk/catalyst-ci/actions/run@master
id: build
Expand Down
21 changes: 9 additions & 12 deletions actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,18 @@ inputs:
description: The version of the CI CLI to install (defaults to latest)
required: false
default: latest
disable_remote_runner:
description: If 'true', will skip configuring a remote Earthly runner
earthly_runner_secret:
description: |
The ID of the AWS secret holding Earthly remote runner credentials. This
secret must contain the runner address and the necessary TLS certificates
required to authenticate with it. If omitted, a remote Earthly runner will
not be configured.
required: false
default: "false"
default: ""
earthly_version:
description: The version of Earthly to install (defaults to latest)
required: false
default: latest
remote_runner_secret:
description: |
The ID of the AWS secret holding Earthly remote runner credentials. This
secret must contain the runner address and the necessary TLS certificates
required to authenticate with it.
required: false
default: "global/ci/ci-tls"
outputs:
token:
description: The Github token to use for interacting with repositories
Expand All @@ -55,6 +52,6 @@ runs:
aws-region: ${{ inputs.aws_region }}
- name: Setup Remote Runner
uses: input-output-hk/catalyst-ci/actions/configure-runner@setup-action
if: ${{ inputs.disable_remote_runner != 'true' }}
if: ${{ inputs.earthly_runner_secret != '' }}
with:
secret: ${{ inputs.remote_runner_secret }}
secret: ${{ inputs.earthly_runner_secret }}

0 comments on commit 53628be

Please sign in to comment.