Skip to content

Commit

Permalink
feat: adds logging into registries to setup action
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgilman committed Oct 12, 2023
1 parent fb642d3 commit 3b77606
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Setup CI
uses: input-output-hk/catalyst-ci/actions/setup@master
uses: input-output-hk/catalyst-ci/actions/setup@publish-action
with:
earthly_skip_install: "true"
- name: Discover Earthly files
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Setup CI
uses: input-output-hk/catalyst-ci/actions/setup@master
uses: input-output-hk/catalyst-ci/actions/setup@publish-action
with:
aws_role_arn: ${{ inputs.aws_role_arn }}
aws_region: ${{ inputs.aws_region }}
Expand Down
19 changes: 19 additions & 0 deletions actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: CI Setup
description: Performs required steps to setup CI.
inputs:
aws_ecr_registry:
description: The address to the ECR registry that will be configured
required: false
default: ""
aws_role_arn:
description: |
The ARN of the AWS role to configure credentials for. If this input is
Expand Down Expand Up @@ -37,6 +41,10 @@ inputs:
description: The version of Earthly to install (defaults to latest)
required: false
default: latest
github_token:
description: Github token used to login to GHCR (defaults to runner token)
required: false
default: ${{ github.token }}
outputs:
token:
description: The Github token to use for interacting with repositories
Expand All @@ -60,6 +68,17 @@ runs:
with:
role-to-assume: ${{ inputs.aws_role_arn }}
aws-region: ${{ inputs.aws_region }}
- name: Login to ECR
uses: docker/login-action@v3
if: ${{ inputs.aws_role_arn != '' && inputs.aws_role_arn != '' && inputs.aws_ecr_registry != '' }}
with:
registry: ${{ inputs.aws_ecr_registry }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ inputs.github_token }}
- name: Setup Remote Runner
uses: input-output-hk/catalyst-ci/actions/configure-runner@master
if: ${{ inputs.earthly_runner_secret != '' && inputs.earthly_skip_install != 'true' }}
Expand Down

0 comments on commit 3b77606

Please sign in to comment.