Skip to content
This repository has been archived by the owner on May 22, 2023. It is now read-only.

Commit

Permalink
specify a files input glob
Browse files Browse the repository at this point in the history
  • Loading branch information
pmbanugo committed May 9, 2022
1 parent 7695771 commit a9b243d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ The action expects a few input parameters which are defined below.
- **app-name-prefix (optional):** Prefix for the app. This is should generally be the name of the pipeline e.g `airtable` prefix will produce `soludo-pr-PR_NUMBER.herokuapp.com`.
- **api-key (required):** Your Heroku API key
- **pipeline-id (required):** The id of the pipeline to deploy the review app to.
- **region (optional):** The region to deploy to. For example `eu` or `us`. Default: `eu`
- **stack (optional):** The Heroku stack to deploy and build with e.g heroku-18. Default: `heroku-20`. If the input `use-app-json` is `true`, the stack will be determined by what's in `app.json`, and if not present, the default on Heroku will be used.
- **use-app-json (optional):** Set up the initial build using the `app.json` in the root directory. Default: `false`.
- **region (optional):** The region to deploy to. For example `eu` or `us`. **Default**: `eu`
- **stack (optional):** The Heroku stack to deploy and build with e.g heroku-18. **Default**: `heroku-20`. If the input `use-app-json` is `true`, the stack will be determined by what's in `app.json`, and if not present, the default on Heroku will be used.
- **use-app-json (optional):** Set up the initial build using the `app.json` in the root directory. **Default**: `false`.
- **team (optional):** The Heroku team the app belongs to.
- **files-glob (optional):** The glob pattern for files/folders to include in the deployment. **Default**: `*`

## What's next?

Expand Down
8 changes: 6 additions & 2 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ inputs:
api-key:
description: "Your Heroku API key"
required: true
files-glob:
default: "*"
description: "The glob pattern for files to include in the deployment"
required: false
pipeline-id:
description: "The id of the pipeline to deploy review app for"
required: true
Expand Down Expand Up @@ -65,7 +69,7 @@ runs:
if: ${{ github.event_name == 'pull_request' && github.event.action != 'closed' }}
shell: bash
run: |
tar -czvf source.tar.gz *
tar -czvf source.tar.gz ${{ inputs.files-glob }}
- name: Upload Source Code
if: ${{ github.event_name == 'pull_request' && github.event.action != 'closed' }}
shell: bash
Expand All @@ -75,7 +79,7 @@ runs:
export URL=$(echo ${{ toJSON(steps.source_endpoint.outputs.SOURCE_ENDPOINT) }} | jq -r '.put')
curl $URL -X PUT -H 'Content-Type:' --data-binary @source.tar.gz
- name: Create App
if: ${{ github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened') && inputs.use-app-json == 'false' }}
if: ${{ github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened') && inputs.use-app-json == 'false' && inputs.team == '' }}
shell: bash
run: |
curl -X POST https://api.heroku.com/apps \
Expand Down

0 comments on commit a9b243d

Please sign in to comment.