https://github.com/italia/js-action-template
GitHub JavaScript action template
https://github.com/italia/js-action-template
actions github github-actions
Last synced: 24 days ago
JSON representation
GitHub JavaScript action template
- Host: GitHub
- URL: https://github.com/italia/js-action-template
- Owner: italia
- License: eupl-1.2
- Created: 2021-02-05T13:34:23.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2023-02-13T14:08:18.000Z (about 3 years ago)
- Last Synced: 2024-04-15T06:52:18.176Z (about 2 years ago)
- Topics: actions, github, github-actions
- Language: JavaScript
- Homepage:
- Size: 80.1 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# GitHub JavaScript action template
[](https://developersitalia.slack.com/messages/CAM3F785T)
[](https://slack.developers.italia.it/)
This is a template repository for [creating a GitHub JavaScript action](https://docs.github.com/en/actions/creating-actions/creating-a-javascript-action).
Click `Use this template` button to create your action based on this template.
A sample action to get GitHub star counts and license from a given repository.
## Inputs
The following inputs briefly explained here are fully declared and documented in the [action.yaml](action.yaml):
* `repo` [**Required**] - GitHub repository to fetch (default `${{ github.repository }}`)
* `github_token` [**Optional**] - GitHub token to interact with GitHub API (default `${{ github.token }}`)
## Examples
Include this action in your repo by creating
`.github/workflows/js-action-template.yml`and edit where needed:
```yml
on: [push, pull_request]
jobs:
examplejob:
runs-on: ubuntu-latest
name: Get Stars and License
steps:
- uses: actions/checkout@v2
- uses: italia/js-action-template@v1
with:
repo: "italia/publiccode-parser-action"
```
## Build the action
Install dependencies
```sh
npm i
```
Build the action
```sh
npm run build
```
## Contributing
Contributing is always appreciated.
Feel free to open issues, fork or submit a Pull Request.
If you want to know more about how to add new fields, check out [CONTRIBUTING.md](CONTRIBUTING.md).
## Maintainers
This software is maintained by the
[Developers Italia](https://developers.italia.it/) team.
## License
© 2021 Dipartimento per la Trasformazione Digitale - Presidenza del Consiglio dei
Ministri
Licensed under the EUPL.
The version control system provides attribution for specific lines of code.
## Remarks
This GitHub Action is published in the Github Marketplace.
As such, you can find the [Terms of Service here](https://docs.github.com/en/free-pro-team@latest/github/site-policy/github-marketplace-terms-of-service).
Also, [here](https://docs.github.com/en/free-pro-team@latest/github/site-policy/github-marketplace-developer-agreement)
you can find the GitHub Marketplace Developer Agreement.