Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/daikikatsuragawa/clasp-action
This action uses clasp to push or deploy to Google Apps Script.
https://github.com/daikikatsuragawa/clasp-action
actions apps-script ci clasp docker gas github-action github-actions-docker google-apps-script shell shell-script
Last synced: 2 months ago
JSON representation
This action uses clasp to push or deploy to Google Apps Script.
- Host: GitHub
- URL: https://github.com/daikikatsuragawa/clasp-action
- Owner: daikikatsuragawa
- License: mit
- Created: 2021-04-13T14:21:31.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-28T01:19:00.000Z (over 1 year ago)
- Last Synced: 2024-09-20T07:16:07.526Z (3 months ago)
- Topics: actions, apps-script, ci, clasp, docker, gas, github-action, github-actions-docker, google-apps-script, shell, shell-script
- Language: Shell
- Homepage: https://github.com/marketplace/actions/clasp-action
- Size: 19.5 KB
- Stars: 31
- Watchers: 3
- Forks: 14
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Clasp Action
This action uses [clasp](https://github.com/google/clasp) to push or deploy to [Google Apps Script](https://developers.google.com/apps-script/). This action is running `clasp push -f` regardless of whether you select `push` or `deploy` as the command. This will force the remote manifest to be overwritten.
## Inputs
### `accessToken`
**Required** `access_token` written in `.clasprc.json`.
### `idToken`
**Required** `id_token` written in `.clasprc.json`.
### `refreshToken`
**Required** `refresh_token` written in `.clasprc.json`.
### `clientId`
**Required** `clientId` written in `.clasprc.json`.
### `clientSecret`
**Required** `clientSecret` written in `.clasprc.json`.
### `scriptId`
**Required** `scriptId` written in `.clasp.json`.
### `rootDir`
Directory where scripts are stored.
### `command`
**Required** Command to execute(`push` or `deploy`).
If `deploy` is selected, this action is running `clasp push -f` just before.
Deploy works for max. 20 deployments due to Gas limit on active deployments and complexity to determine which deployment should be deleted.
Workaround : Set deployId.### `description`
Description of the deployment.
### `deployId`
Deploy ID that will be updated with this push.
## Example usage
### Case to push
```yaml
- uses: daikikatsuragawa/[email protected]
with:
accessToken: ${{ secrets.ACCESS_TOKEN }}
idToken: ${{ secrets.ID_TOKEN }}
refreshToken: ${{ secrets.REFRESH_TOKEN }}
clientId: ${{ secrets.CLIENT_ID }}
clientSecret: ${{ secrets.CLIENT_SECRET }}
scriptId: ${{ secrets.SCRIPT_ID }}
command: 'push'
```### Case to deploy
```yaml
- uses: daikikatsuragawa/[email protected]
with:
accessToken: ${{ secrets.ACCESS_TOKEN }}
idToken: ${{ secrets.ID_TOKEN }}
refreshToken: ${{ secrets.REFRESH_TOKEN }}
clientId: ${{ secrets.CLIENT_ID }}
clientSecret: ${{ secrets.CLIENT_SECRET }}
scriptId: ${{ secrets.SCRIPT_ID }}
command: 'deploy'
```### Case to deploy with description
```yaml
- uses: daikikatsuragawa/[email protected]
with:
accessToken: ${{ secrets.ACCESS_TOKEN }}
idToken: ${{ secrets.ID_TOKEN }}
refreshToken: ${{ secrets.REFRESH_TOKEN }}
clientId: ${{ secrets.CLIENT_ID }}
clientSecret: ${{ secrets.CLIENT_SECRET }}
scriptId: ${{ secrets.SCRIPT_ID }}
command: 'deploy'
description: 'Sample description'
```### Case to specify the directory where scripts are stored
```yaml
- uses: daikikatsuragawa/[email protected]
with:
accessToken: ${{ secrets.ACCESS_TOKEN }}
idToken: ${{ secrets.ID_TOKEN }}
refreshToken: ${{ secrets.REFRESH_TOKEN }}
clientId: ${{ secrets.CLIENT_ID }}
clientSecret: ${{ secrets.CLIENT_SECRET }}
scriptId: ${{ secrets.SCRIPT_ID }}
rootDir: 'src'
command: 'push'
```### Case to update a specific deploy
```yaml
- uses: daikikatsuragawa/[email protected]
with:
accessToken: ${{ secrets.ACCESS_TOKEN }}
idToken: ${{ secrets.ID_TOKEN }}
refreshToken: ${{ secrets.REFRESH_TOKEN }}
clientId: ${{ secrets.CLIENT_ID }}
clientSecret: ${{ secrets.CLIENT_SECRET }}
scriptId: ${{ secrets.SCRIPT_ID }}
command: 'deploy'
deployId: ${{ secrets.DEPLOY_ID }}
```## License summary
This code is made available under the MIT license.