Skip to content

Commit b1148de

Browse files
authored
Merge branch 'aws-actions:master' into master
2 parents b13ca00 + b3a528e commit b1148de

12 files changed

+68237
-53885
lines changed

.github/workflows/check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: validate
22-
uses: actions/github-script@v6
22+
uses: actions/github-script@v7
2323
with:
2424
script: |
2525
// See https://gist.github.com/marcojahn/482410b728c31b221b70ea6d2c433f0c#file-conventional-commit-regex-md

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343

4444
# Initializes the CodeQL tools for scanning.
4545
- name: Initialize CodeQL
46-
uses: github/codeql-action/init@v1
46+
uses: github/codeql-action/init@v3
4747
with:
4848
languages: ${{ matrix.language }}
4949
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -54,7 +54,7 @@ jobs:
5454
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5555
# If this step fails, then you should remove it and run the build manually (see below)
5656
- name: Autobuild
57-
uses: github/codeql-action/autobuild@v1
57+
uses: github/codeql-action/autobuild@v3
5858

5959
# ℹ️ Command-line programs to run using the OS shell.
6060
# 📚 https://git.io/JvXDl
@@ -68,4 +68,4 @@ jobs:
6868
# make release
6969

7070
- name: Perform CodeQL Analysis
71-
uses: github/codeql-action/analyze@v1
71+
uses: github/codeql-action/analyze@v3

.github/workflows/notifications.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Send Notifications to Slack
2+
on:
3+
pull_request:
4+
types: [opened, reopened]
5+
issues:
6+
types: [opened]
7+
issue_comment:
8+
types: [created]
9+
10+
jobs:
11+
issue-notifications:
12+
name: Send Notifications
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Send notifications on Pull Request
17+
if: ${{ github.event_name == 'pull_request'}}
18+
id: slack_PR
19+
uses: slackapi/[email protected]
20+
with:
21+
payload: |
22+
{
23+
"Notification Type": "Pull Request",
24+
"Notification URL":"${{ github.event.pull_request.html_url }}",
25+
"GitHub Repo": "${{ github.repository }}",
26+
"Notification Title": "${{ github.event.pull_request.title }}"
27+
}
28+
env:
29+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
30+
- name: Send notification on new issues
31+
if: ${{github.event_name == 'issues'}}
32+
id: slack_issue
33+
uses: slackapi/[email protected]
34+
with:
35+
payload: |
36+
{
37+
"Notification Type": "Issue",
38+
"Notification URL":"${{ github.event.issue.html_url }}",
39+
"GitHub Repo": "${{ github.repository }}",
40+
"Notification Title": "${{ github.event.issue.title }}"
41+
}
42+
env:
43+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
44+
- name: Send notification on Issues and Pull Requests Comments
45+
if: ${{github.event_name == 'issue_comment'}}
46+
id: slack_issue_comment
47+
uses: slackapi/[email protected]
48+
with:
49+
payload: |
50+
{
51+
"Notification Type": "Issue comment",
52+
"Notification URL":"${{ github.event.comment.html_url }}",
53+
"GitHub Repo": "${{ github.repository }}",
54+
"Notification Title": "${{ github.event.issue_comment.issue.title }}"
55+
}
56+
env:
57+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,26 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
## [1.6.0](https://github.com/aws-actions/amazon-ecs-deploy-task-definition/compare/v1.5.0...v1.6.0) (2024-07-18)
6+
7+
8+
### Features
9+
10+
* Add CodeDeploy deployment config name parameter ([4b15394](https://github.com/aws-actions/amazon-ecs-deploy-task-definition/commit/4b153949000fb656721f5a776216cb7e446d9f98))
11+
12+
13+
### Bug Fixes
14+
15+
* pass maxWaitTime in seconds ([b5c6c3f](https://github.com/aws-actions/amazon-ecs-deploy-task-definition/commit/b5c6c3fcbdf37b6f40a448364f91bfa3f824e3d0))
16+
* waiter options ([a15de3c](https://github.com/aws-actions/amazon-ecs-deploy-task-definition/commit/a15de3cf6c410374c35333dbbf96b183206ac0b7))
17+
18+
## [1.5.0](https://github.com/aws-actions/amazon-ecs-deploy-task-definition/compare/v1.4.11...v1.5.0) (2024-05-07)
19+
20+
21+
### Features
22+
23+
* Add desired tasks ([#505](https://github.com/aws-actions/amazon-ecs-deploy-task-definition/issues/505)) ([e5f78d3](https://github.com/aws-actions/amazon-ecs-deploy-task-definition/commit/e5f78d3088b0f4f96faca249870440a0001deaa3))
24+
525
### [1.4.11](https://github.com/aws-actions/amazon-ecs-deploy-task-definition/compare/v1.4.10...v1.4.11) (2023-01-04)
626

727
### [1.4.10](https://github.com/aws-actions/amazon-ecs-deploy-task-definition/compare/v1.4.9...v1.4.10) (2022-09-30)

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,26 @@ The minimal permissions require access to CodeDeploy:
222222
}
223223
```
224224

225+
## Running Tasks
226+
227+
For services which need an initialization task, such as database migrations, or ECS tasks that are run without a service, additional configuration can be added to trigger an ad-hoc task run. When combined with GitHub Action's `on: schedule` triggers, runs can also be scheduled without EventBridge.
228+
229+
In the following example, the service would not be updated until the ad-hoc task exits successfully.
230+
231+
```yaml
232+
- name: Deploy to Amazon ECS
233+
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
234+
with:
235+
task-definition: task-definition.json
236+
service: my-service
237+
cluster: my-cluster
238+
wait-for-service-stability: true
239+
run-task: true
240+
wait-for-task-stopped: true
241+
```
242+
243+
Overrides and VPC networking options are available as well. See [actions.yml](actions.yml) for more details.
244+
225245
## Troubleshooting
226246

227247
This action emits debug logs to help troubleshoot deployment failures. To see the debug logs, create a secret named `ACTIONS_STEP_DEBUG` with value `true` in your repository.
@@ -233,3 +253,4 @@ This code is made available under the MIT license.
233253
## Security Disclosures
234254

235255
If you would like to report a potential security issue in this project, please do not create a GitHub issue. Instead, please follow the instructions [here](https://aws.amazon.com/security/vulnerability-reporting/) or [email AWS security directly](mailto:[email protected]).
256+

action.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ inputs:
1111
description: 'The number of instantiations of the task to place and keep running in your service.'
1212
required: false
1313
service:
14-
description: 'The name of the ECS service to deploy to. The action will only register the task definition if no service is given.'
14+
description: 'The name of the ECS service to deploy to. If no service is given, the action will not deploy the task, but only register the task definition.'
1515
required: false
1616
cluster:
1717
description: "The name of the ECS service's cluster. Will default to the 'default' cluster"
@@ -32,11 +32,35 @@ inputs:
3232
description: "The name of the AWS CodeDeploy deployment group, if the ECS service uses the CODE_DEPLOY deployment controller. Will default to 'DgpECS-{cluster}-{service}'."
3333
required: false
3434
codedeploy-deployment-description:
35-
description: "A description of the deployment, if the ECS service uses the CODE_DEPLOY deployment controller."
35+
description: "A description of the deployment, if the ECS service uses the CODE_DEPLOY deployment controller. NOTE: This will be truncated to 512 characters if necessary."
36+
required: false
37+
codedeploy-deployment-config:
38+
description: "The name of the AWS CodeDeploy deployment configuration, if the ECS service uses the CODE_DEPLOY deployment controller. If not specified, the value configured in the deployment group or `CodeDeployDefault.OneAtATime` is used as the default."
3639
required: false
3740
force-new-deployment:
3841
description: 'Whether to force a new deployment of the service. Valid value is "true". Will default to not force a new deployment.'
3942
required: false
43+
run-task:
44+
description: 'Whether to run the task outside of an ECS service. Task will run before the service is updated if both are provided. Will default to not run.'
45+
required: false
46+
run-task-container-overrides:
47+
description: 'A JSON array of container override objects which should applied when running a task outside of a service. Warning: Do not expose this field to untrusted inputs. More details: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerOverride.html'
48+
required: false
49+
run-task-security-groups:
50+
description: 'A comma-separated list of security group IDs to assign to a task when run outside of a service. Will default to none.'
51+
required: false
52+
run-task-subnets:
53+
description: 'A comma-separated list of subnet IDs to assign to a task when run outside of a service. Will default to none.'
54+
required: false
55+
run-task-launch-type:
56+
description: "ECS launch type for tasks run outside of a service. Valid values are 'FARGATE' or 'EC2'. Will default to 'FARGATE'."
57+
required: false
58+
run-task-started-by:
59+
description: "A name to use for the startedBy tag when running a task outside of a service. Will default to 'GitHub-Actions'."
60+
required: false
61+
wait-for-task-stopped:
62+
description: 'Whether to wait for the task to stop when running it outside of a service. Will default to not wait.'
63+
required: false
4064
outputs:
4165
task-definition-arn:
4266
description: 'The ARN of the registered ECS task definition'

0 commit comments

Comments
 (0)