deploy
This commit is contained in:
48
.gitea/actions/k8s/action.yaml
Normal file
48
.gitea/actions/k8s/action.yaml
Normal file
@@ -0,0 +1,48 @@
|
||||
name: 'deploy'
|
||||
description: 'deploy'
|
||||
|
||||
inputs:
|
||||
environment:
|
||||
required: true
|
||||
type: string
|
||||
tag:
|
||||
required: true
|
||||
type: string
|
||||
migrate:
|
||||
type: bool
|
||||
default: false
|
||||
secrets:
|
||||
required: false
|
||||
type: string
|
||||
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: Argo Login
|
||||
uses: clowdhaus/argo-cd-action/@main
|
||||
with:
|
||||
version: 2.13.3
|
||||
command: login
|
||||
options: ${{ vars.ARGO_HOST }} --username ${{ vars.ARGO_USER }} --password ${{ fromJSON(inputs.secrets).ARGO_PASSWORD }}
|
||||
- name: Change tag name
|
||||
uses: clowdhaus/argo-cd-action/@main
|
||||
with:
|
||||
version: 2.13.3
|
||||
command: app set ${{ inputs.environment }} --parameter images.${{github.event.repository.name}}=${{ inputs.tag }}
|
||||
- name: Migrate
|
||||
if: ${{ inputs.migrate == 'true' }}
|
||||
uses: clowdhaus/argo-cd-action/@main
|
||||
with:
|
||||
version: 2.13.3
|
||||
command: app set ${{ inputs.environment }} --parameter migrations.${{github.event.repository.name}}=PreSync
|
||||
- name: Sync changes
|
||||
uses: clowdhaus/argo-cd-action/@main
|
||||
with:
|
||||
version: 2.13.3
|
||||
command: app sync ${{ inputs.environment }}
|
||||
- name: Migrate
|
||||
if: ${{ inputs.migrate == 'true' }}
|
||||
uses: clowdhaus/argo-cd-action/@main
|
||||
with:
|
||||
version: 2.13.3
|
||||
command: app unset ${{ inputs.environment }} --parameter migrations.${{github.event.repository.name}}
|
||||
Reference in New Issue
Block a user