Skip to content

Commit a8d6e16

Browse files
authored
Add initial version (#3)
1 parent 034d3c6 commit a8d6e16

File tree

17 files changed

+5549
-13753
lines changed

17 files changed

+5549
-13753
lines changed

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
dist/** -diff linguist-generated=true
1+
dist/** -diff linguist-generated=true

.github/dependabot.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,17 @@ on: # rebuild any PRs and main branch changes
55
branches:
66
- main
77
- 'releases/*'
8-
98
jobs:
10-
build: # make sure build/ci work properly
9+
build:
1110
runs-on: ubuntu-latest
1211
steps:
1312
- uses: actions/checkout@v2
14-
- run: |
15-
npm install
16-
- run: |
17-
npm run all
1813
test: # make sure the action works on a clean machine without building
1914
runs-on: ubuntu-latest
2015
steps:
2116
- uses: actions/checkout@v2
2217
- uses: ./
18+
if: always()
2319
with:
24-
milliseconds: 1000
20+
github-token: ${{ secrets.GITHUB_TOKEN }}
21+
webhook-uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI }}

LICENSE

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
21
The MIT License (MIT)
32

4-
Copyright (c) 2018 GitHub, Inc. and contributors
3+
Copyright (c) 2020 opsless.io and contributors
54

65
Permission is hereby granted, free of charge, to any person obtaining a copy
76
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 1 addition & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -1,101 +1 @@
1-
<p align="center">
2-
<a href="https://github.com/actions/typescript-action/actions"><img alt="typescript-action status" src="https://github.com/actions/typescript-action/workflows/build-test/badge.svg"></a>
3-
</p>
4-
5-
# Create a JavaScript Action using TypeScript
6-
7-
Use this template to bootstrap the creation of a TypeScript action.:rocket:
8-
9-
This template includes compilation support, tests, a validation workflow, publishing, and versioning guidance.
10-
11-
If you are new, there's also a simpler introduction. See the [Hello World JavaScript Action](https://github.com/actions/hello-world-javascript-action)
12-
13-
## Create an action from this template
14-
15-
Click the `Use this Template` and provide the new repo details for your action
16-
17-
## Code in Main
18-
19-
Install the dependencies
20-
```bash
21-
$ npm install
22-
```
23-
24-
Build the typescript and package it for distribution
25-
```bash
26-
$ npm run build && npm run package
27-
```
28-
29-
Run the tests :heavy_check_mark:
30-
```bash
31-
$ npm test
32-
33-
PASS ./index.test.js
34-
✓ throws invalid number (3ms)
35-
wait 500 ms (504ms)
36-
test runs (95ms)
37-
38-
...
39-
```
40-
41-
## Change action.yml
42-
43-
The action.yml contains defines the inputs and output for your action.
44-
45-
Update the action.yml with your name, description, inputs and outputs for your action.
46-
47-
See the [documentation](https://help.github.com/en/articles/metadata-syntax-for-github-actions)
48-
49-
## Change the Code
50-
51-
Most toolkit and CI/CD operations involve async operations so the action is run in an async function.
52-
53-
```javascript
54-
import * as core from '@actions/core';
55-
...
56-
57-
async function run() {
58-
try {
59-
...
60-
}
61-
catch (error) {
62-
core.setFailed(error.message);
63-
}
64-
}
65-
66-
run()
67-
```
68-
69-
See the [toolkit documentation](https://github.com/actions/toolkit/blob/master/README.md#packages) for the various packages.
70-
71-
## Publish to a distribution branch
72-
73-
Actions are run from GitHub repos so we will checkin the packed dist folder.
74-
75-
Then run [ncc](https://github.com/zeit/ncc) and push the results:
76-
```bash
77-
$ npm run package
78-
$ git add dist
79-
$ git commit -a -m "prod dependencies"
80-
$ git push origin releases/v1
81-
```
82-
83-
Your action is now published! :rocket:
84-
85-
See the [versioning documentation](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md)
86-
87-
## Validate
88-
89-
You can now validate the action by referencing `./` in a workflow in your repo (see [test.yml](.github/workflows/test.yml))
90-
91-
```yaml
92-
uses: ./
93-
with:
94-
milliseconds: 1000
95-
```
96-
97-
See the [actions tab](https://github.com/actions/typescript-action/actions) for runs of this action! :rocket:
98-
99-
## Usage:
100-
101-
After testing you can [create a v1 tag](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md) to reference the stable and latest V1 action
1+
# MS Team Github Actions integration

__tests__/main.test.ts

Lines changed: 0 additions & 27 deletions
This file was deleted.

action.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
name: 'Your name here'
2-
description: 'Provide a description here'
3-
author: 'Your name or organization here'
1+
name: opsless/ms-teams-github-actions
2+
description: Microsoft Teams Github Actions integration
3+
author: opsless.io team
44
inputs:
5-
milliseconds: # change this
5+
github-token:
66
required: true
7-
description: 'input description here'
8-
default: 'default value if applicable'
7+
description: Github token
8+
webhook-uri:
9+
required: true
10+
description: MS Teams webhook URI
911
runs:
10-
using: 'node12'
11-
main: 'dist/index.js'
12+
using: node12
13+
main: dist/main/index.js

0 commit comments

Comments
 (0)