forked from aws-actions/amazon-ecs-render-task-definition
-
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.
Merge remote-tracking branch 'upstream/master' into upstream-master
- Loading branch information
Showing
11 changed files
with
5,930 additions
and
10,926 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,13 +9,11 @@ jobs: | |
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
#Version actions/[email protected] | ||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 | ||
uses: actions/checkout@v4 | ||
- name: Node setup | ||
#Version actions/[email protected] | ||
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "18.16.1" | ||
node-version: 20 | ||
- name: Run tests | ||
run: | | ||
npm ci | ||
|
@@ -25,7 +23,7 @@ jobs: | |
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: validate | ||
uses: actions/github-script@v6 | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
// See https://gist.github.com/marcojahn/482410b728c31b221b70ea6d2c433f0c#file-conventional-commit-regex-md | ||
|
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,57 @@ | ||
name: Send Notifications to Slack | ||
on: | ||
pull_request: | ||
types: [opened, reopened] | ||
issues: | ||
types: [opened] | ||
issue_comment: | ||
types: [created] | ||
|
||
jobs: | ||
issue-notifications: | ||
name: Send Notifications | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Send notifications on Pull Request | ||
if: ${{ github.event_name == 'pull_request'}} | ||
id: slack_PR | ||
uses: slackapi/[email protected] | ||
with: | ||
payload: | | ||
{ | ||
"Notification Type": "Pull Request", | ||
"Notification URL":"${{ github.event.pull_request.html_url }}", | ||
"GitHub Repo": "${{ github.repository }}", | ||
"Notification Title": "${{ github.event.pull_request.title }}" | ||
} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
- name: Send notification on new issues | ||
if: ${{github.event_name == 'issues'}} | ||
id: slack_issue | ||
uses: slackapi/[email protected] | ||
with: | ||
payload: | | ||
{ | ||
"Notification Type": "Issue", | ||
"Notification URL":"${{ github.event.issue.html_url }}", | ||
"GitHub Repo": "${{ github.repository }}", | ||
"Notification Title": "${{ github.event.issue.title }}" | ||
} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
- name: Send notification on Issues and Pull Requests Comments | ||
if: ${{github.event_name == 'issue_comment'}} | ||
id: slack_issue_comment | ||
uses: slackapi/[email protected] | ||
with: | ||
payload: | | ||
{ | ||
"Notification Type": "Issue comment", | ||
"Notification URL":"${{ github.event.comment.html_url }}", | ||
"GitHub Repo": "${{ github.repository }}", | ||
"Notification Title": "${{ github.event.issue_comment.issue.title }}" | ||
} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |
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,33 +1,41 @@ | ||
# When a pull request is opened/reopened or when the head branch of the pull request is updated. | ||
on: | ||
push: | ||
branches: | ||
- master | ||
[pull_request] | ||
|
||
name: Package | ||
|
||
jobs: | ||
check: | ||
name: Package distribution file | ||
runs-on: ubuntu-22.04 | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout | ||
#Version actions/[email protected] | ||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 | ||
with: | ||
ref: master | ||
- name: Node setup | ||
#Version actions/[email protected] | ||
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d | ||
with: | ||
node-version: "18.16.1" | ||
- name: Package | ||
run: | | ||
npm ci | ||
npm test | ||
npm run package | ||
- name: Commit | ||
run: | | ||
git config --global user.name "GitHub Actions" | ||
git add dist/ | ||
git commit -m "chore: Update dist" || echo "No changes to commit" | ||
git push origin HEAD:master | ||
- name: Init a git repo | ||
uses: actions/checkout@v4 | ||
- name: Checkout PR | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: gh pr checkout ${{ github.event.pull_request.number }} | ||
- name: Node setup | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
- name: Package | ||
run: | | ||
npm ci | ||
npm test | ||
npm run package | ||
- name: Commit to PR | ||
if: github.actor == 'dependabot[bot]' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
git config --global user.name "GitHub Actions" | ||
git add dist/ | ||
git commit -m "chore: Update dist" || echo "No changes to commit" | ||
git push | ||
- name: Check git diff | ||
if: github.actor != 'dependabot[bot]' | ||
run: | | ||
git diff --exit-code dist/index.js |
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
Oops, something went wrong.