This Github action runs a CLI command using the Porter CLI.
steps:
- name: Run a Porter CLI commanduses: porter-dev/porter-cli-action@v0.1.1with:
command: versionenv:
PORTER_HOST: https://dashboard.porter.runPORTER_CLUSTER: 1234PORTER_PROJECT: 4321PORTER_TOKEN: ${{ secrets.PORTER_TOKEN }}The possible inputs are:
command: (string, required): The subcommand to run for the Porter CLI. Runporter -hlocally with the latest CLI to see the full list of options.
To run a Porter CLI command that builds from a Dockerfile with the path ./docker/Dockerfile, you could run the following:
steps:
- name: Checkout codeuses: actions/checkout@v2.3.4
- name: Set Github tagid: varsrun: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Update a Porter applicationtimeout-minutes: 20uses: porter-dev/porter-cli-action@v0.1.0with:
command: update --app my-app --tag ${{ steps.vars.outputs.sha_short }} --dockerfile ./docker/Dockerfile --streamenv:
PORTER_HOST: https://dashboard.getporter.devPORTER_CLUSTER: 1234PORTER_PROJECT: 4321PORTER_TOKEN: ${{ secrets.PORTER_TOKEN }}