Compare commits
19 commits
s3-backup
...
discord-st
Author | SHA1 | Date | |
---|---|---|---|
6bc986e927 | |||
f8e57f9c42 | |||
aed6b7d8b5 | |||
645b08808d | |||
5b7dd1518e | |||
359fc28f42 | |||
055f354e83 | |||
86b3b0912d | |||
a60e2f51aa | |||
e46f51fd2e | |||
a2e99b57e5 | |||
5e212f85ea | |||
d844f70082 | |||
09c11a69f3 | |||
b9417ddf84 | |||
70be117bd5 | |||
c3efb4a49f | |||
23bb552e82 | |||
![]() |
8191038ee0 |
2 changed files with 62 additions and 1 deletions
|
@ -6,8 +6,9 @@ The actions are used by Elysium to run CI/CD tasks and this repo will be archive
|
||||||
|
|
||||||
The actions available are:
|
The actions available are:
|
||||||
- [S3 Backup](https://gitea.dunemask.dev/elysium/elysium-actions/src/branch/s3-backup/action.yml)
|
- [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)
|
- [Oasis Auto Setup](https://gitea.dunemask.dev/elysium/elysium-actions/src/branch/oasis-setup-auto/action.yml)
|
||||||
- [Infisical Env](https://gitea.dunemask.dev/elysium/elysium-actions/src/branch/infisical-env/action.yml)
|
- [Infisical Env](https://gitea.dunemask.dev/elysium/elysium-actions/src/branch/infisical-env/action.yml)
|
||||||
|
- [Oasis Advanced Setup](https://gitea.dunemask.dev/elysium/elysium-actions/src/branch/oasis-setup-advanced/action.yml)
|
||||||
- [Elysium CI/CD](https://gitea.dunemask.dev/elysium/elysium-actions/src/branch/elysium-ci-cd/action.yml)
|
- [Elysium CI/CD](https://gitea.dunemask.dev/elysium/elysium-actions/src/branch/elysium-ci-cd/action.yml)
|
||||||
|
|
||||||
## Workflow Template
|
## Workflow Template
|
||||||
|
|
60
action.yml
Normal file
60
action.yml
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
name: Oasis Auto Config Action
|
||||||
|
description: Configure env for deploying apps using Oasis Automagically
|
||||||
|
inputs:
|
||||||
|
channel:
|
||||||
|
description: Channel (ci or deployments)
|
||||||
|
required: true
|
||||||
|
header:
|
||||||
|
description: Header to be displayed next to the environment
|
||||||
|
required: true
|
||||||
|
status:
|
||||||
|
description: Job Status (Can be provided using ${{ job.status }})
|
||||||
|
required: true
|
||||||
|
additional-content:
|
||||||
|
descrption: Additional info to include in the message
|
||||||
|
required: false
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- name: Configure Envars
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
if [ ${{ inputs.channel }} == "deployments" ]; then
|
||||||
|
echo DISCORD_WEBHOOK=${{ env.DISCORD_WEBHOOK_DEPLOYMENTS }} >> $GITHUB_ENV
|
||||||
|
echo DISCORD_MESSAGE_TITLE=DEPLOY >> $GITHUB_ENV
|
||||||
|
elif [ ${{ inputs.channel }} == "ci" ]; then
|
||||||
|
echo DISCORD_WEBHOOK=${{ env.DISCORD_WEBHOOK_CI }} >> $GITHUB_ENV
|
||||||
|
echo DISCORD_MESSAGE_TITLE=CI >> $GITHUB_ENV
|
||||||
|
else
|
||||||
|
echo "Error! channel required, and must be 'ci' or 'deployments'!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ ${{ inputs.status }} == "success" ]; then
|
||||||
|
echo DISCORD_MESSAGE_STATUS_ICON=":white_check_mark:" >> $GITHUB_ENV
|
||||||
|
echo DISCORD_MESSAGE_STATUS_COLOR=3405175 >> $GITHUB_ENV
|
||||||
|
elif [ ${{ inputs.status }} == "failure" ]; then
|
||||||
|
echo DISCORD_MESSAGE_STATUS_ICON=":x:" >> $GITHUB_ENV
|
||||||
|
echo DISCORD_MESSAGE_STATUS_COLOR=16071219 >> $GITHUB_ENV
|
||||||
|
else
|
||||||
|
echo "I donotwannaknow?"
|
||||||
|
echo DISCORD_MESSAGE_STATUS_ICON=":warning:" >> $GITHUB_ENV
|
||||||
|
echo DISCORD_MESSAGE_STATUS_COLOR=16102451 >> $GITHUB_ENV
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Save Common Envars
|
||||||
|
echo DISCORD_MESSAGE_ACTION_URL=${{ env.GITHUB_SERVER_URL }}/${{ env.GITHUB_REPOSITORY }}/actions/runs/${{ env.GITHUB_RUN_NUMBER }} >> $GITHUB_ENV
|
||||||
|
echo DISCORD_MESSAGE_REPOSITORY_URL=${{ env.GITHUB_SERVER_URL }}/${{ env.GITHUB_REPOSITORY }} >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Configure Kubeconfig
|
||||||
|
uses: https://github.com/tsickert/discord-webhook@v5.4.0
|
||||||
|
with:
|
||||||
|
webhook-url: ${{ env.DISCORD_WEBHOOK }}
|
||||||
|
embed-title: Action Details
|
||||||
|
embed-description: ${{ env.GITHUB_REPOSITORY }}
|
||||||
|
embed-footer-text: "Repository: ${{ env.DISCORD_MESSAGE_REPOSITORY_URL }}"
|
||||||
|
embed-url: ${{ env.DISCORD_MESSAGE_ACTION_URL }}
|
||||||
|
embed-color: ${{ env.DISCORD_MESSAGE_STATUS_COLOR }}
|
||||||
|
content: |-
|
||||||
|
**[${{ env.DISCORD_MESSAGE_TITLE }}]** | ${{ inputs.header }} | ${{ env.DISCORD_MESSAGE_STATUS_ICON }}
|
||||||
|
${{ inputs.additional-content }}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue