-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 0bb8c6f
Showing
12 changed files
with
23,137 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
on: | ||
push: | ||
branches: | ||
- releases/next | ||
|
||
jobs: | ||
verify_action_works: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ejhayes/action-argocd-deploy@releases/next | ||
with: | ||
dryRun: true | ||
clientId: username | ||
clientSecret: password | ||
clusterName: 'default' | ||
baseUrl: https://example.com | ||
name: my-service | ||
namespace: default | ||
path: fixtures | ||
project: default | ||
valuesFile: fixtures/values.yaml | ||
tokens: | | ||
TAG: latest | ||
annotations: | | ||
myannotation: "true" | ||
labels: | | ||
group: group-a | ||
env: prod | ||
info: | | ||
rev: ${{ github.ref }} | ||
sha: ${{ github.sha }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
# v1.1.2 (Tue Sep 27 2022) | ||
|
||
#### ⚠️ Pushed to `main` | ||
|
||
- adding changelog to release ([@ejhayes](https://github.com/ejhayes)) | ||
|
||
#### Authors: 1 | ||
|
||
- Eric Hayes ([@ejhayes](https://github.com/ejhayes)) | ||
|
||
--- | ||
|
||
# v1.1.1 (Tue Sep 27 2022) | ||
|
||
#### ⚠️ Pushed to `main` | ||
|
||
- fix name of pr ([@ejhayes](https://github.com/ejhayes)) | ||
|
||
#### Authors: 1 | ||
|
||
- Eric Hayes ([@ejhayes](https://github.com/ejhayes)) | ||
|
||
--- | ||
|
||
# v1.1.0 (Tue Sep 27 2022) | ||
|
||
#### 🚀 Enhancement | ||
|
||
- Mytest [#6](https://github.com/ejhayes/action-argocd-deploy/pull/6) ([@ejhayes](https://github.com/ejhayes)) | ||
|
||
#### ⚠️ Pushed to `main` | ||
|
||
- fix name of pr ([@ejhayes](https://github.com/ejhayes)) | ||
|
||
#### Authors: 1 | ||
|
||
- Eric Hayes ([@ejhayes](https://github.com/ejhayes)) | ||
|
||
--- | ||
|
||
# v1.0.0 (Mon Sep 26 2022) | ||
|
||
#### 💥 Breaking Change | ||
|
||
- updating [#5](https://github.com/ejhayes/action-argocd-deploy/pull/5) ([@ejhayes](https://github.com/ejhayes)) | ||
|
||
#### Authors: 1 | ||
|
||
- Eric Hayes ([@ejhayes](https://github.com/ejhayes)) | ||
|
||
--- | ||
|
||
# v0.1.0 (Mon Sep 26 2022) | ||
|
||
#### 🚀 Enhancement | ||
|
||
- this is new [#4](https://github.com/ejhayes/action-argocd-deploy/pull/4) ([@ejhayes](https://github.com/ejhayes)) | ||
|
||
#### Authors: 1 | ||
|
||
- Eric Hayes ([@ejhayes](https://github.com/ejhayes)) | ||
|
||
--- | ||
|
||
# v0.0.1 (Mon Sep 26 2022) | ||
|
||
:tada: This release contains work from a new contributor! :tada: | ||
|
||
Thank you, Eric Hayes ([@ejhayes](https://github.com/ejhayes)), for all your work! | ||
|
||
#### ⚠️ Pushed to `main` | ||
|
||
- initial commit ([@ejhayes](https://github.com/ejhayes)) | ||
|
||
#### Authors: 1 | ||
|
||
- Eric Hayes ([@ejhayes](https://github.com/ejhayes)) | ||
|
||
--- | ||
|
||
# v1.1.0 (Mon Sep 26 2022) | ||
|
||
:tada: This release contains work from a new contributor! :tada: | ||
|
||
Thank you, Eric Hayes ([@ejhayes](https://github.com/ejhayes)), for all your work! | ||
|
||
#### 🚀 Enhancement | ||
|
||
- typo change [#1](https://github.com/ejhayes/action-argocd-deploy/pull/1) ([@ejhayes](https://github.com/ejhayes)) | ||
|
||
#### ⚠️ Pushed to `main` | ||
|
||
- removing changelog ([@ejhayes](https://github.com/ejhayes)) | ||
- Initial commit ([@ejhayes](https://github.com/ejhayes)) | ||
|
||
#### Authors: 1 | ||
|
||
- Eric Hayes ([@ejhayes](https://github.com/ejhayes)) |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,160 @@ | ||
# action-argocd-deploy | ||
|
||
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --> | ||
|
||
[![All Contributors](https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat-square)](#contributors-) | ||
|
||
<!-- ALL-CONTRIBUTORS-BADGE:END --> | ||
|
||
<!-- action-docs-description --> | ||
## Description | ||
|
||
This action calls the ArgoCD API to create/update an application | ||
|
||
|
||
<!-- action-docs-description --> | ||
|
||
## Quickstart | ||
|
||
To use this in your projects: | ||
|
||
### minimal example | ||
|
||
Using [access token](https://argo-cd.readthedocs.io/en/latest/user-guide/commands/argocd_account_generate-token/): | ||
|
||
```yaml | ||
- 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: prod | ||
``` | ||
|
||
Using username/password (or clientid/secret): | ||
|
||
```yaml | ||
- 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: prod | ||
``` | ||
|
||
**NOTE:** `valuesFile` will be interpolated using environment variables you specify. The example above would replace `__MY_TOKEN__` with `someValue`. | ||
|
||
### fuller example | ||
|
||
```yaml | ||
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: | ||
|
||
```yaml | ||
service: | ||
someParam: | ||
repository: ealen/echo-server:__OTHERTOKEN__ | ||
someSecret: __MYSECRET__ | ||
``` | ||
|
||
<!-- action-docs-inputs --> | ||
## Inputs | ||
|
||
| parameter | description | required | default | | ||
| - | - | - | - | | ||
| accessToken | ArgoCD access token | `false` | | | ||
| action | Action to perform (upsert, delete) | `false` | upsert | | ||
| annotations | Key/Value pair of annotations for the application | `false` | {} | | ||
| baseUrl | ArgoCD base url to use | `true` | | | ||
| clientId | ArgoCD Client Id / Username | `false` | | | ||
| clientSecret | ArgoCD Client Secret / Password | `false` | | | ||
| clusterName | Cluster name to deploy to | `true` | | | ||
| dryRun | Dry run mode (do not create or delete anything) | `false` | false | | ||
| 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` | | | ||
| prNumber | PR number | `false` | ${{ github.event.number }} | | ||
| repoRevision | Repo revision to deploy | `false` | ${{ github.sha }} | | ||
| repoUrl | Repo URL to deploy | `false` | ${{ github.server_url }}/${{ github.repository }} | | ||
| repoWebUrl | Repo web url | `false` | ${{ github.server_url }}/${{ github.repository }} | | ||
| tokens | Key/Value list of tokens to replace in helm chart | `false` | {} | | ||
| valuesFile | Values file to pass to ArgoCD | `true` | | | ||
|
||
|
||
|
||
<!-- action-docs-inputs --> | ||
|
||
<!-- action-docs-outputs --> | ||
|
||
<!-- action-docs-outputs --> | ||
|
||
<!-- action-docs-runs --> | ||
## Runs | ||
|
||
This action is a `node16` action. | ||
|
||
|
||
<!-- action-docs-runs --> | ||
|
||
## Contributors ✨ | ||
|
||
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): | ||
|
||
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> | ||
<!-- prettier-ignore-start --> | ||
<!-- markdownlint-disable --> | ||
<!-- markdownlint-restore --> | ||
<!-- prettier-ignore-end --> | ||
|
||
<!-- ALL-CONTRIBUTORS-LIST:END --> | ||
|
||
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: 'ArgoCD Deploy Action' | ||
description: 'This action calls the ArgoCD API to create/update an application' | ||
author: 'Eric Hayes' | ||
inputs: | ||
accessToken: | ||
description: ArgoCD access token | ||
required: false | ||
action: | ||
description: Action to perform (upsert, delete) | ||
default: upsert | ||
required: false | ||
annotations: | ||
description: Key/Value pair of annotations for the application | ||
required: false | ||
default: '{}' | ||
baseUrl: | ||
description: 'ArgoCD base url to use' | ||
required: true | ||
clientId: | ||
description: 'ArgoCD Client Id / Username' | ||
required: false | ||
clientSecret: | ||
description: 'ArgoCD Client Secret / Password' | ||
required: false | ||
clusterName: | ||
description: 'Cluster name to deploy to' | ||
required: true | ||
dryRun: | ||
description: 'Dry run mode (do not create or delete anything)' | ||
required: false | ||
default: false | ||
info: | ||
description: Key/Value pair of argo info values | ||
required: false | ||
default: '{}' | ||
labels: | ||
description: Key/Value pair of labels to apply to argo application | ||
required: false | ||
default: '{}' | ||
name: | ||
description: 'Name of the application to create' | ||
required: true | ||
namespace: | ||
description: 'Namespace to deploy application to' | ||
required: true | ||
path: | ||
description: 'Path to helm chart' | ||
required: false | ||
default: '' | ||
project: | ||
description: 'Argo project to create application in' | ||
required: true | ||
prNumber: | ||
description: 'PR number' | ||
default: ${{ github.event.number }} | ||
repoRevision: | ||
description: Repo revision to deploy | ||
required: false | ||
default: ${{ github.sha }} | ||
repoUrl: | ||
description: Repo URL to deploy | ||
required: false | ||
default: ${{ github.server_url }}/${{ github.repository }} | ||
repoWebUrl: | ||
description: Repo web url | ||
required: false | ||
default: ${{ github.server_url }}/${{ github.repository }} | ||
tokens: | ||
description: 'Key/Value list of tokens to replace in helm chart' | ||
required: false | ||
default: '{}' | ||
valuesFile: | ||
description: 'Values file to pass to ArgoCD' | ||
required: true | ||
|
||
runs: | ||
using: 'node16' | ||
main: 'dist/index.js' |
Oops, something went wrong.