-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add composite bootstrap action
- Loading branch information
1 parent
5fb1af0
commit 9b776b0
Showing
7 changed files
with
51 additions
and
193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: test | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: build | ||
uses: ./ | ||
with: | ||
ecr-repo-name: intercontinental |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# actions-template | ||
# action-bootstrap | ||
|
||
Template repo for github actions | ||
A Github action to perform common tasks for build pipelines |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,38 @@ | ||
name: Some action # TODO(user): Replace this with your action name | ||
name: Action Bootstrap | ||
branding: | ||
icon: arrow-right-circle | ||
color: gray-dark | ||
description: | # TODO(user): replace this with your action description | ||
This action does something | ||
description: | | ||
This action performs git repo checkout, configures AWS credentials, logs into ECR and generates the image name | ||
inputs: | ||
debug-mode: | ||
description: Set to true for verbose execution when debugging | ||
required: false | ||
default: 'false' | ||
log-level: | ||
description: The log level to use for the execution | ||
required: false | ||
default: 'info' | ||
log-timestamped: | ||
description: Set to true in order to enable timestamps on log messages | ||
required: false | ||
default: 'true' | ||
# TODO(user): Specify your inputs here | ||
input-name: | ||
description: Some input description | ||
ecr-repo-name: | ||
required: true | ||
|
||
# TODO(user): Define your outputs here | ||
outputs: | ||
some-output: | ||
description: 'Some output description' | ||
|
||
runs: | ||
using: 'docker' | ||
image: Dockerfile | ||
env: | ||
DEBUG_MODE: ${{ inputs.debug-mode }} | ||
LOG_LEVEL: ${{ inputs.log-level }} | ||
LOG_TIMESTAMPED: ${{ inputs.log-timestamped }} | ||
# TODO(user): Define your environment variables here | ||
SOME_INPUT: ${{ inputs.input-name }} | ||
using: 'composite' | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
fetch-depth: 0 | ||
- name: Configure AWS credentials | ||
uses: aws-actions/[email protected] | ||
with: | ||
role-to-assume: ${{ secrets.AWS_OIDC_IAM_ROLE_OPS_GH_CI }} | ||
role-session-name: ${{ secrets.AWS_OPS_SESSION_NAME }} | ||
aws-region: ${{ secrets.AWS_OPS_DEFAULT_REGION }} | ||
- name: Login to Amazon ECR | ||
id: login-ecr | ||
uses: aws-actions/amazon-ecr-login@v2 | ||
- name: Image Name | ||
id: img-name | ||
run: | | ||
if [[ "${{ github.event_name }}" == "pull_request" ]]; then | ||
echo "ecr-repo-name=${{secrets.AWS_OPS_ACCOUNT_ID}}.dkr.ecr.${{ secrets.AWS_OPS_DEFAULT_REGION }}.amazonaws.com/alpha-image/${{ env.ECR_REPO_NAME }}" >>"${GITHUB_OUTPUT}" | ||
else | ||
echo "ecr-repo-name=${{secrets.AWS_OPS_ACCOUNT_ID}}.dkr.ecr.${{ secrets.AWS_OPS_DEFAULT_REGION }}.amazonaws.com/image/${{ env.ECR_REPO_NAME }}" >>"${GITHUB_OUTPUT}" | ||
fi | ||
env: | ||
ECR_REPO_NAME: ${{ inputs.ecr-repo-name }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.