GitHub Action
faros-cicd-github-action
v3.0.6
Latest version
Faros CI/CD GitHub Action
A GitHub Action to report CI/CD information for code builds and deployments from a GitHub Action workflows to Faros.
Usage
See action.yml for the full documentation for this action's inputs and outputs.
Report a code build (CI Event) To Faros
To report a code build to Faros specify CI
in the event
parameter and include the CI
required fields.
- name: Report code build to Faros
id: send-ci-event
uses: faros-ai/faros-cicd-github-action@v3.0.6
with:
api-key: ${{ secrets.FAROS_API_KEY }}
event: CI
artifact: Docker://my-org/my-repo/artifactId
run-status: ${{ job.status }} # possible values - Success, Failed, Canceled
run-started-at: 1594938057000 # millis since epoch, ISO-8601 string or 'Now'
run-ended-at: 1594948069000 # millis since epoch, ISO-8601 string or 'Now'
Report a code deployment (CD Event) To Faros
To report an artifact deployment to Faros specify CD
in the event
parameter and include the CD
required fields.
- name: Report deployment to Faros
id: send-cd-event
uses: faros-ai/faros-cicd-github-action@v3.0.6
with:
api-key: ${{ secrets.FAROS_API_KEY }}
event: CD
artifact: Docker://my-org/my-repo/artifactId
deploy: CodeDeploy://MyService/<env>/deploymentId # possible env values - Dev, Prod, Staging, QA
deploy-status: Success # possible values - Success, Failed, Canceled
deploy-started-at: 1594938057000 # millis since epoch, ISO-8601 string or 'Now'
deploy-ended-at: 1594938059000 # millis since epoch, ISO-8601 string or 'Now'
run-status: ${{ job.status }} # possible values - Success, Failed, Canceled
run-started-at: 1594938057000 # millis since epoch, ISO-8601 string or 'Now'
run-ended-at: 1594948069000 # millis since epoch, ISO-8601 string or 'Now'
Authentication
Running the action requires a valid Faros account and API key.
Developing
$ npm i
Releasing
Actions are run from GitHub repos so add the dist folder to the commit:
$ npm run build
$ npm run package
$ git add dist
Push the changes to a branch and open a PR.
License Summary
This code is made available under the MIT license.