This action calls the ArgoCD API to create/update an application
To use this in your projects:
Using access token:
- uses: ejhayes/action-argocd-deploy@releases/v1
with:
accessToken: MY_ACCESS_TOKEN
baseUrl: http://argocd-api.example.com
name: 'my-service'
namespace: theNamespace
project: myproject
tokens: |
SOME_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MY_TOKEN: someValue
valuesFile: ./values.yaml
info: |
environment: prodUsing username/password (or clientid/secret):
- uses: ejhayes/action-argocd-deploy@releases/v1
with:
clientId: MY_USERNAME
clientSecret: MY_PASSWORD
baseUrl: http://argocd-api.example.com
name: 'my-service'
namespace: theNamespace
project: myproject
tokens: |
SOME_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MY_TOKEN: someValue
valuesFile: ./values.yaml
info: |
environment: prodNOTE: valuesFile will be interpolated using environment variables you specify. The example above would replace __MY_TOKEN__ with someValue.
on:
- deployment
- delete
jobs:
tester:
runs-on: ubuntu-latest
steps:
- uses: ejhayes/action-argocd-deploy@releases/v1
with:
clientId: ${{ secrets.ARGOCD_CLIENTID }}
clientSecret: ${{ secrets.ARGOCD_CLIENTSECRET }}
clusterName: 'default'
baseUrl: https://example.com
name: my-service
namespace: default
path: fixtures
project: default
valuesFile: fixtures/values.yml
tokens: |
MYSECRET: somestring-${{ secrets.GITHUB_TOKEN }}
OTHERTOKEN: theOtherValue
annotations: |
myannotation: "true"
labels: |
group: group-a
env: prod
info: |
rev: ${{ github.ref }}
sha: ${{ github.sha }}Example fixtures/values.yml would contain:
service:
someParam:
repository: ealen/echo-server:__OTHERTOKEN__
someSecret: __MYSECRET__| parameter | description | required | default |
|---|---|---|---|
| action | Action to perform (upsert, delete) | true |
upsert |
| annotations | Key/Value pair of annotations for the application | false |
{} |
| clientId | ArgoCD Client Id / Username | false |
|
| clientSecret | ArgoCD Client Secret / Password | false |
|
| clusterName | Cluster name to deploy to | true |
|
| contentType | Override default content-type header | false |
application/json; charset=utf-8 |
| baseUrl | ArgoCD base url to use | true |
|
| gitRef | Revision to deploy to ArgoCD | false |
${{ github.ref }} |
| gitRepo | GitHub repository to use | false |
${{ github.repository }} |
| info | Key/Value pair of argo info values | false |
{} |
| labels | Key/Value pair of labels to apply to argo application | false |
{} |
| name | Name of the application to create | true |
|
| namespace | Namespace to deploy application to | true |
|
| path | Path to helm chart | false |
|
| project | Argo project to create application in | true |
|
| tokens | Key/Value list of tokens to replace in helm chart | false |
{} |
| valuesFile | Values file to pass to ArgoCD | true |
This action is a node16 action.
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!