NOTE: This project is currently a work in progress prototype
This Action for Radix CLI to integrate with the Radix platform from a github action workflow.
The standard output from execution of the rx
command.
This Action can be used to run any rx
command. The run make some assumptions:
- There is a Radix config file in the repository that it can use as input (--from-config in radix-cli is set as argument on the action)
- There is a defined environment variable set
APP_SERVICE_ACCOUNT_TOKEN
, with the token of the service account provided to administer the application. The environment variable can be set on a single step or on the entire flow. - The service account token will only have access to single application in a single cluster/context, and will be provided in the Radix web console
Examples:
- name: Deploy on Radix
uses: equinor/radix-github-actions@master
with:
args: >
trigger
deploy
-a application-name
-e ${{ steps.getEnvironment.outputs.result }}
-f
-f
will ensure that the action step is followed, and won't continue until step is complete.
- name: Deploy on Radix
uses: equinor/radix-github-actions@master
with:
args: >
trigger
deploy
--context playground
-a application-name
-e ${{ steps.getEnvironment.outputs.result }}
-f
--from-config
will read information such as application-name, context/cluster etc from your radixconfig.yaml
- name: Deploy on radix
uses: equinor/radix-github-actions@master
with:
args: >
trigger
deploy
--from-config
-e ${{ steps.getEnvironment.outputs.result }}
-f
--context playground
will communicate with playground cluster, if your application resides there.
- name: Set component environment secret
uses: equinor/radix-github-actions@master
with:
args: >
set environment-secret
-e <your environment name>
--component <your component name>
-s <your secret name>
-v '<your secret value>'
- name: Get environment from branch mapping in Radix config for repository
id: getEnvironment
uses: equinor/radix-github-actions@master
with:
args: >
get-config branch-environment
--from-config
-b ${GITHUB_REF##*/}
- name: Print the environment
run: echo "${{ steps.getEnvironment.outputs.result }}"
The Dockerfile and associated scripts and documentation in this project are released under the MIT License.