Compare commits

...
Sign in to create a new pull request.

49 commits

Author SHA1 Message Date
656f3b4fc4 [CHORE] Adjust Actions 2024-08-25 16:37:56 -06:00
684bd4c5e6 [CHORE] Adjust Actions 2024-08-25 16:26:14 -06:00
fc069b3d84 [CHORE] Adjust Actions 2024-08-25 16:24:33 -06:00
973a0c1630 [CHORE] Adjust Actions 2024-08-25 16:24:14 -06:00
f862dba1f2 [CHORE] Adjust Actions 2024-08-25 16:20:53 -06:00
8723efbe94 [CHORE] Adjust Actions 2024-08-25 16:09:17 -06:00
936984d107 [CHORE] Adjust Actions 2024-08-25 16:05:55 -06:00
30c126de33 [CHORE] Adjust Actions 2024-08-25 16:04:59 -06:00
642ca1ff5f [CHORE] Adjust Actions 2024-08-25 16:01:17 -06:00
112f948741 [CHORE] Adjust Actions 2024-08-25 16:01:02 -06:00
5173e5f7a8 [CHORE] Adjust Actions 2024-08-25 15:53:46 -06:00
b860d1e284 [CHORE] Adjust Actions 2024-08-25 15:49:36 -06:00
a15d16e4d2 [CHORE] Adjust Actions 2024-08-25 15:47:06 -06:00
486de9afd3 [CHORE] Adjust Actions 2024-08-25 15:45:36 -06:00
b31e229b84 [CHORE] Adjust Actions 2024-08-25 15:44:09 -06:00
4b035f4b8e [CHORE] Adjust Actions 2024-08-25 15:43:18 -06:00
70c79a1171 [CHORE] Adjust Actions 2024-08-25 15:41:23 -06:00
38622e122e [CHORE] Adjust Actions 2024-08-25 15:40:08 -06:00
c065e05588 [CHORE] Adjust Actions 2024-08-25 15:35:00 -06:00
5a3ef3be18 [CHORE] Adjust Actions 2024-08-25 15:33:59 -06:00
171bbfaf69 [CHORE] Adjust Actions 2024-08-25 15:32:51 -06:00
ccc1c48951 [CHORE] Adjust Actions 2024-08-25 15:31:10 -06:00
b0538f2232 [CHORE] Tweak Checkout Action 2024-08-25 14:53:09 -06:00
15fc42183f [CHORE] Tweak Action Playground 2024-08-25 14:50:58 -06:00
16a0461d97 [CHORE] Tweak Action Playground 2024-08-25 14:48:41 -06:00
0b1c4cb212 [CHORE] Remove Excess Logging 2024-08-24 21:27:56 -06:00
4ed43f40be [CHORE] Tweak Secret Usage 2024-08-24 20:32:33 -06:00
f3a4f82368 [CHORE] Tweak Secret Usage 2024-08-24 20:27:56 -06:00
dunemask
0c0670a908 Merge pull request '[CHORE] Bump garden to 13.29' (#1) from ep/Apr6-2024/GardenVersionBump into oasis-setup-advanced
Reviewed-on: https://gitea.dunemask.dev/elysium/elysium-actions/pulls/1
2024-04-07 02:54:22 +00:00
dunemask
902de144dc [CHORE] Bump garden to 13.29 2024-04-07 02:43:01 +00:00
636bb98d2f [FIX] Fixed Oasis 2024-02-14 21:40:14 -07:00
e8f5a00cef [DEBUG] Debug 2024-02-14 21:38:04 -07:00
08b815286f [DEBUG] Debug 2024-02-14 21:36:48 -07:00
7cbaae0be3 [DEBUG] Debug 2024-02-14 21:27:53 -07:00
6f64a8a9ff [DEBUG] Debug 2024-02-14 21:24:22 -07:00
cb90f85f92 [DEBUG] Debug 2024-02-14 21:08:40 -07:00
c021ec21ba [DEBUG] Debug 2024-02-14 20:46:00 -07:00
6b1260fa4b [DEBUG] Debug 2024-02-14 20:45:13 -07:00
3d7e62eb30 [DEBUG] Debug 2024-02-14 20:43:59 -07:00
a4697b2655 [DEBUG] Debug 2024-02-14 20:41:56 -07:00
dunemask
fec0d92bbe Update action.yml 2024-02-15 03:26:01 +00:00
dunemask
b59a89cf52 Update action.yml 2024-02-15 03:24:29 +00:00
dunemask
e7920efd42 Update action.yml 2024-02-15 03:23:43 +00:00
dunemask
a704cbfd10 Update action.yml 2024-02-15 03:19:39 +00:00
dunemask
dbf8182e81 Update action.yml 2024-02-15 03:18:12 +00:00
dunemask
72a9c62af4 [DEBUG] Action Debugging 2024-02-15 03:04:35 +00:00
f80938e7fa [FEATURE] Oasis Action 2024-02-13 23:46:09 -07:00
dunemask
1e632a3f91 Update README.md 2024-02-13 16:35:09 -07:00
56324c2d05 [FIX] Restored action to oasis-deploy 2024-02-13 16:25:01 -07:00
2 changed files with 115 additions and 1 deletions

View file

@ -1,3 +1,40 @@
# Elysium Actions
## About
The actions are used by Elysium to run CI/CD tasks and this repo will be archived once Gitea supports private actions (See issue [Here](https://github.com/go-gitea/gitea/issues/24621) )
The actions are used by Elysium to run CI/CD tasks and this repo will be archived once Gitea supports private actions (See issue [Here](https://github.com/go-gitea/gitea/issues/24621))
## Actions
The actions available are:
- [S3 Backup](https://gitea.dunemask.dev/elysium/elysium-actions/src/branch/s3-backup/action.yml)
- [Oasis Deploy](https://gitea.dunemask.dev/elysium/elysium-actions/src/branch/oasis-deploy/action.yml)
- [Infisical Env](https://gitea.dunemask.dev/elysium/elysium-actions/src/branch/infisical-env/action.yml)
- [Elysium CI/CD](https://gitea.dunemask.dev/elysium/elysium-actions/src/branch/elysium-ci-cd/action.yml)
## Workflow Template
The example below demonstrates how to use the [oasis-deploy](https://gitea.dunemask.dev/elysium/elysium-actions/src/branch/oasis-deploy/action.yml) action.
```yml
name: Deploy Edge
run-name: ${{ gitea.actor }} Deploy Edge
on:
push:
branches: [ master ]
env:
GITEA_TOKEN: ${{ secrets.ELYSIUM_ORG_READ_TOKEN }}
KUBECONFIG_BASE64: ${{ secrets.KUBECONFIG_USW_EDGE }}
GARDEN_DEPLOY_ACTION: nile
jobs:
deploy-edge:
steps:
- name: Oasis Setup
uses: https://gitea.dunemask.dev/elysium/elysium-actions@oasis-deploy
with:
gitea-token: ${{ env.GITEA_TOKEN }}
kubeconfig: ${{ env.KUBECONFIG_BASE64 }}
- name: Deploy to Edge env
run: garden deploy $GARDEN_DEPLOY_ACTION --force --force-build --env usw-edge
working-directory: ${{ env.OASIS_WORKSPACE }}
```

77
action.yml Normal file
View file

@ -0,0 +1,77 @@
name: 'Oasis Config Action'
description: 'Configure env for deploying apps using Oasis'
inputs:
kubeconfig:
description: 'A base64 encoded string of the kubeconfig to use. Required!'
required: true
forgejo-token:
description: 'Forgejo token for downloading repositories'
required: false
default: ${{ env.DEVOPS_FORGEJO_ELYSIUM_ORG_READ_TOKEN }} # Action can't read env, so we need to reset it later
garden-version:
description: 'Version of Garden to deploy'
required: false
default: 0.13.29
oasis-branch:
description: 'Branch of Oasis to use'
required: false
default: master
oasis-workspace:
descipriont: 'Workspace to setup Oasis'
required: false
default: ${{ gitea.workspace }}/oasis
runs:
using: "composite"
steps:
# Set additional Envars
- name: Setting Short Commit Sha
run: echo SHORT_COMMIT_SHA=$(echo $GITHUB_SHA | cut -c 1-6) >> $GITHUB_ENV
- name: Setup Enviornment Variables
shell: bash
run: |
echo CI_NAMESPACE=ci-$SHORT_COMMIT_SHA >> $GITHUB_ENV
echo DEVOPS_FORGEJO_ELYSIUM_ORG_READ_TOKEN=${{ inputs.forgejo-token }} >> $GITHUB_ENV
echo "Checking out Oasis"
# Checkout Oasis
- name: Checkout Oasis
uses: actions/checkout@v3
with:
repository: "elysium/oasis"
path: ${{ inputs.oasis-workspace }}
token: ${{ env.DEVOPS_FORGEJO_ELYSIUM_ORG_READ_TOKEN }}
ref: ${{ inputs.oasis-branch }}
- name: Download Garden
shell: bash
env:
GARDEN_BIN_VERSION: ${{ inputs.garden-version }}
GARDEN_DIR: ${{ runner.temp }}/garden
run: |
# Install Garden
mkdir -p "$GARDEN_DIR"
cd "$GARDEN_DIR"
if ! [ -d "$GARDEN_BIN_VERSION" ]; then
echo "Downloading ${GARDEN_BIN_VERSION}..."
if [[ "$GARDEN_BIN_VERSION" = "latest" ]]; then
tag_param=""
else
tag_param="$GARDEN_BIN_VERSION"
fi
fi
curl -sL https://get.garden.io/install.sh | bash -s -- $tag_param
echo PATH=$PATH:$HOME/.garden/bin >> $GITHUB_ENV
git config --global --add safe.directory $HOME/.garden/bin/static
echo "Finished intalling Garden!"
# Configure K&S
- name: Configure K8S
run: |
echo "Setup kubeconfig"
mkdir -p ~/.kube &&
echo ${{ inputs.kubeconfig }} | base64 -d > ~/.kube/config &&
chmod 700 ~/.kube/config
echo "Finished setting up kubeconfig"
- name: Export Envars
shell: bash
run: |
# Export environment variables
echo OASIS_WORKSPACE=${{ inputs.oasis-workspace }} >> $GITHUB_ENV