https://github.com/vtex/apps-framework-request-action
https://github.com/vtex/apps-framework-request-action
vtex-apps-framework
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/vtex/apps-framework-request-action
- Owner: vtex
- License: mit
- Created: 2021-11-05T16:47:38.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-09-27T07:41:28.000Z (over 2 years ago)
- Last Synced: 2024-04-14T14:22:33.927Z (about 2 years ago)
- Topics: vtex-apps-framework
- Language: JavaScript
- Homepage:
- Size: 730 KB
- Stars: 0
- Watchers: 13
- Forks: 2
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# VTEX Apps Framework API request action
Execute an API request for VTEX Apps Framework
## Usage
You can consume the action by referencing one of the existing branches. Example:
```yaml
uses: vtex/apps-framework-request-action@v1
with:
request-type: create-app-release
app-specification: '{"name":"app-name","vendor":"vendor-name","version":"0.0.10","services":[{"name":"service","folder":"./","image-name":"vtex-docker/image-name"}]}'
wait-app-release-complete: true # Optional
```
See the [actions tab](https://github.com/actions/apps-framework-request-action/actions) for runs of this action! :rocket:
`request-type` is mandatory and can be one of the following values
- `create-app-release`
The other parameters are required or optional depending on the request type
### create-app-release params
`app-specification`: **mandatory**. It is the parsed content of `vtex.yml` file of your app. The app-specification can be retrieved `get-vtex-app-metadata-action`:
```yaml
- name: Get app metadata
id: app-metadata
uses: ./.github/actions/get-vtex-app-metadata
```
Then you can reference it with `${{steps.app-metadata.outputs.app-specification}}`
`wait-app-release-complete`: **optional**. Default value: `false`. If `true`, the app `create-app-release` action will finish only when the deploy succeeds or fails.
## Contribute
### Development
Install the dependencies
```bash
yarn install
```
Run the tests :heavy_check_mark:
```bash
yarn run test
```
See the [toolkit documentation](https://github.com/actions/toolkit/blob/master/README.md#packages) for the various packages. This action is based in the [JavaScript Action template](https://github.com/actions/javascript-action).
### Package for distribution
Run prepare
```bash
npm run prepare
```
Since the packaged index.js is run from the dist folder.
```bash
git add dist
```
### Create a release branch
Checkin to the v1 release branch
```bash
git checkout -b v1
git commit -a -m "v1 release"
```
```bash
git push origin v1
```
See the [versioning documentation](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md)