This action emits a deploy event for service to OpsLevel. We have configured it with sane defaults so you should only have to specify integration_url
and service
. environment
defaults to production
so if you want to track deploys from other environments you'll want to specify that too.
jobs:
deploy:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Report Deploy using OpsLevel CLI
uses: OpsLevel/[email protected]
with:
integration_url: ${{ secrets.DEPLOY_INTEGRATION_URL }}
service: "my-service"
jobs:
deploy:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Report Deploy using Docker
uses: OpsLevel/report-deploy-github-action/[email protected]
with:
integration_url: ${{ secrets.DEPLOY_INTEGRATION_URL }}
service: "my-service"
Required The OpsLevel deploy integration url.
The service alias for the event - Default: <github_org_or_user_name>/<repository_name>
If the repository has an ./opslevel.yml
file the service name will get pulled from it.
The description or release notes for the event - Default: "Event Created by ${{ github.workflow }}"
The environment for the event - Default: "production"
The deploy number for the event - Default: ${{ github.run_number }}
The deployer name who created the event - Default: ${{ github.actor }}
The deployer email who create the event - Default: ""
The deploy url that OpsLevel points to - Default: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
An identifier that can be used to deduplicate deployments - Default: ${{ github.run_id }}
This action can be run using either Docker or the OpsLevel CLI, both have identical inputs and behave identically.
To report deploys to OpsLevel with the OpsLevel CLI based Github Action (default), add uses: OpsLevel/[email protected]
to your workflow.
To report deploys to OpsLevel with the Docker based Github Action, add uses: OpsLevel/report-deploy-github-action/[email protected]
to your workflow.
For Github workflows operating within intentional constraints, perhaps where building public Docker images is not an option, it may be preferable to use the default OpsLevel CLI.
If you want to add the git commit author as the deployer
jobs:
deploy:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get Deployer
id: deployer
run: |
DEPLOYER=$(git show -s --format='%ae')
echo "DEPLOYER=${DEPLOYER}" >> $GITHUB_OUTPUT
- name: Report Deploy
uses: OpsLevel/[email protected]
with:
integration_url: ${{ secrets.DEPLOY_INTEGRATION_URL }}
service: "my-service"
deployer_email: ${{ steps.deployer.outputs.DEPLOYER }}