Releases on GitHub Actions
If you release your services via GitHub Actions, you can use our Actions to record releases to Clairvoyance.
- Make an API token.
- Add the following to your GitHub Actions workflow that does the release.
steps:
- uses: prodvana/[email protected]
with:
org: my-org
api_token: ${{ secrets.YOUR_PRODVANA_API_TOKEN }}
- uses: prodvana/[email protected]
id: record-release # this allows referencing the output of this action later
with:
app: my-app # e.g. product name
service: my-service # e.g. web, api
release_channel: prod # e.g. staging, prod, staging-eu
pending: true # this marks the release as pending to be updated by a later step
# do actual release
# for example
- name: Release code
shell: bash
run: |
kubectl apply -f my-config.yaml
# then add these finalizers at the end to update the status of your release
- uses: prodvana/[email protected]
with:
release_id: ${{ steps.record-release.outputs.release_id }}
- uses: prodvana/[email protected]
if: failure()
with:
release_id: ${{ steps.record-release.outputs.release_id }}
failed: true
If your GitHub Actions workflow does not allow you to easily add the finalizer, you can also use record-release-action
on its own without setting pending
. Note that in this case, you will not be able to differentiate between successful and failed releases.
steps:
- uses: prodvana/[email protected]
with:
org: my-org
api_token: ${{ secrets.YOUR_PRODVANA_API_TOKEN }}
- uses: prodvana/[email protected]
with:
app: my-app # e.g. product name
service: my-service # e.g. web, api
release_channel: prod # e.g. staging, prod, staging-eu
# do actual release
# for example
- name: Release code
shell: bash
run: |
kubectl apply -f my-config.yaml
For an end-to-end comprehensive example, please check out our demo repository.
Updated about 1 month ago