Skip to content

Commit 28b2414

Browse files
committed
init-comit
1 parent 7d8611b commit 28b2414

File tree

7 files changed

+8637
-0
lines changed

7 files changed

+8637
-0
lines changed

.github/workflows/release.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Release
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
permissions:
8+
contents: read # for checkout
9+
10+
jobs:
11+
release:
12+
name: Release
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write # to be able to publish a GitHub release
16+
issues: write # to be able to comment on released issues
17+
pull-requests: write # to be able to comment on released pull requests
18+
id-token: write # to enable use of OIDC for npm provenance
19+
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v3
23+
with:
24+
fetch-depth: 0
25+
26+
- name: Setup Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: 20
30+
31+
- name: Install dependencies
32+
run: npm clean-install
33+
34+
- name: Release
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
38+
run: npx semantic-release

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Ignore cached node modules
2+
node_modules/
3+
node_modules

.tool-versions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodejs 25.1.0

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<!--
2+
Documentation:
3+
This file provides information about the `action-deploy-google-cloud` GitHub Action.
4+
The action is designed to deploy applications to Google Cloud Platform (GCP).
5+
For usage instructions, configuration options, and examples, refer to the sections below.
6+
-->
7+
# action-deploy-google-cloud
8+
deploy to gcp

action.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: 'action-aws-ecs-deploy'
2+
description: 'Configures AWS, renders Task Definition, and deploys to ECS for a single service/region combination.'
3+
4+
inputs:
5+
task-definition:
6+
description: 'The task definition file path (e.g., .aws/sandbox-us-west-2-translation-service.json)'
7+
required: true
8+
container-name:
9+
description: 'The name of the container in the task definition to update (e.g., sandbox-translation-service-container)'
10+
required: true
11+
region:
12+
description: 'The AWS region to deploy to'
13+
required: true
14+
service:
15+
description: 'The name of the service to deploy (e.g., translation-service)'
16+
required: true
17+
cluster:
18+
description: 'The name of the ECS cluster to deploy to (e.g., platform-sandbox-us-west-2)'
19+
required: true
20+
role:
21+
description: 'The IAM Role ARN to assume for deployment'
22+
required: true
23+
image:
24+
description: 'The ECR image URL (e.g., 123456789012.dkr.ecr.us-west-2.amazonaws.com/my-image:latest)'
25+
required: true
26+
27+
runs:
28+
using: "composite"
29+
steps:
30+
- name: Checkout Code
31+
uses: actions/checkout@v5
32+
33+
- name: Job Info
34+
shell: bash
35+
run: |
36+
echo "Deploying to ${{ inputs.environment }} in region ${{ inputs.region }} for service ${{ inputs.service }} with role ${{ inputs.role }} using image tag ${{ inputs.image_tag }}"
37+
38+
- name: Configure AWS Credentials
39+
uses: aws-actions/configure-aws-credentials@v3
40+
with:
41+
role-to-assume: ${{ inputs.role }}
42+
role-session-name: github-action-session-deploy
43+
aws-region: ${{ inputs.region }}
44+
45+
- name: Fill in the new image ID in the Amazon ECS task definition
46+
id: task-def
47+
uses: aws-actions/amazon-ecs-render-task-definition@v1
48+
with:
49+
# Construct the task definition path using inputs
50+
task-definition: ${{ inputs.task-definition }}
51+
# Construct the container name using inputs
52+
container-name: ${{ inputs.container-name }}
53+
# Construct the full image URL using inputs
54+
image: ${{ inputs.image }}
55+
shell: bash
56+
57+
- name: Deploy Amazon ECS task definition
58+
uses: aws-actions/amazon-ecs-deploy-task-definition@v2
59+
with:
60+
task-definition: ${{ steps.task-def.outputs.task-definition }}
61+
# Construct the service name using inputs
62+
service: ${{ inputs.service }}
63+
# Construct the cluster name using inputs
64+
cluster: ${{ inputs.cluster }}
65+
wait-for-service-stability: true
66+
shell: bash

0 commit comments

Comments
 (0)