Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: improves setup action #36

Merged
merged 37 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
b64012c
refactor: improves setup action
jmgilman Oct 11, 2023
9c9e3f1
chore: specifies GITHUB_TOKEN as input
jmgilman Oct 11, 2023
22cba1a
wip: testing
jmgilman Oct 11, 2023
9a48024
wip: testing
jmgilman Oct 11, 2023
67cfc46
wip: testing
jmgilman Oct 11, 2023
f9659bc
wip: testing
jmgilman Oct 11, 2023
d12a249
wip: testing
jmgilman Oct 11, 2023
4f9d7f7
wip: testing
jmgilman Oct 11, 2023
7a66a24
wip: testing
jmgilman Oct 11, 2023
9b3db97
wip: testing
jmgilman Oct 11, 2023
171d828
wip: testing
jmgilman Oct 11, 2023
77a1b23
wip: testing
jmgilman Oct 11, 2023
5e09c5d
wip: testing
jmgilman Oct 11, 2023
41b113b
wip: testing
jmgilman Oct 11, 2023
0265035
wip: testing
jmgilman Oct 11, 2023
3d1c3d1
wip: testing
jmgilman Oct 11, 2023
6c898af
wip: testing
jmgilman Oct 11, 2023
e6af724
wip: testing
jmgilman Oct 11, 2023
dd9b32f
wip: testing
jmgilman Oct 11, 2023
c17b56b
wip: testing
jmgilman Oct 12, 2023
c8c79d7
wip: testing
jmgilman Oct 12, 2023
9d75965
wip: testing
jmgilman Oct 12, 2023
bba9c82
wip: cleanup
jmgilman Oct 12, 2023
78035e6
chore: adds test
jmgilman Oct 12, 2023
3299509
feat: defaults to downloading latest version
jmgilman Oct 12, 2023
461c82e
chore: package
jmgilman Oct 12, 2023
86abfad
wip: testing
jmgilman Oct 12, 2023
c4fa444
refactor: only configure AWS when inputs are present
jmgilman Oct 12, 2023
a6670fd
refactor: don't pull Github token in setup action
jmgilman Oct 12, 2023
608dfd3
wip: testing
jmgilman Oct 12, 2023
fb925e0
refactor: optionally set up remote runner
jmgilman Oct 12, 2023
5444e54
chore: bumps configure-aws-credentials version
jmgilman Oct 12, 2023
8f12ad9
wip: testing
jmgilman Oct 12, 2023
53628be
refactor: don't default earthly runner secret
jmgilman Oct 12, 2023
df08de0
wip: testing
jmgilman Oct 12, 2023
749a5b2
feat: allow skipping cli/earthly install steps
jmgilman Oct 12, 2023
755679b
chore: cleanup
jmgilman Oct 12, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/dogfood.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ jobs:
with:
aws_role_arn: arn:aws:iam::332405224602:role/ci
aws_region: eu-central-1
earthly_version: 0.7.15
secrets:
earthly_runner_address: ${{ secrets.EARTHLY_SATELLITE_ADDRESS }}
earthly_runner_address: ${{ secrets.EARTHLY_SATELLITE_ADDRESS }}
earthly_runner_secret: ${{ secrets.EARTHLY_RUNNER_SECRET }}
16 changes: 11 additions & 5 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,9 +59,7 @@ jobs:
- name: Setup CI
uses: input-output-hk/catalyst-ci/actions/setup@master
with:
aws_role_arn: ${{ inputs.aws_role_arn }}
aws_region: ${{ inputs.aws_region }}
earthly_version: ${{ inputs.earthly_version }}
earthly_skip_install: "true"
- name: Discover Earthly files
uses: input-output-hk/catalyst-ci/actions/discover@master
id: discover
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 All @@ -106,8 +113,7 @@ jobs:
- name: Compress artifact
if: startsWith(github.ref, 'refs/tags/') || inputs.force_artifact
run: |
cwd=$(pwd)
cd ${{ steps.build.outputs.artifact }} && tar -czvf "$cwd/${{ steps.artifact.outputs.name }}.tar.gz" .
find "${{ steps.build.outputs.artifact }}" -printf "%P\n" | tar -czvf "${{ steps.artifact.outputs.name }}.tar.gz" -C "${{ steps.build.outputs.artifact }}" -T -
- name: Upload artifact
uses: actions/upload-artifact@v3
if: startsWith(github.ref, 'refs/tags/') || inputs.force_artifact
Expand Down
3 changes: 1 addition & 2 deletions actions/configure-runner/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ inputs:
default: "/tmp/certs"
secret:
description: "The AWS secret to read the runner certificates from"
required: false
default: "global/ci/ci-tls"
required: true
runs:
using: "node20"
main: "dist/index.js"
16 changes: 10 additions & 6 deletions actions/install/action.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
name: "Install"
description: "Installs the Catalyst-CI CLI"
name: Install
description: Installs the Catalyst-CI CLI
inputs:
token:
description: Github token used to query API for available CLI releases
required: false
default: ${{ github.token }}
version:
description: "The version of the Catalyst-CI CLI to install"
description: The version of the Catalyst-CI CLI to install (defaults to latest)
required: false
default: "0.1.0"
default: latest
runs:
using: "node20"
main: "dist/index.js"
using: node20
main: dist/index.js
Loading