feat: add initial Portainer stack and template configurations for AdGuard Home
This commit is contained in:
53
.gitea/workflows/create-new-template.yaml
Normal file
53
.gitea/workflows/create-new-template.yaml
Normal file
@@ -0,0 +1,53 @@
|
||||
name: Create New Stack or Template
|
||||
run-name: Create ${{ inputs.folder_type }}/${{ inputs.app_name }} by @${{ gitea.actor }}
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
app_name:
|
||||
description: 'Name of the app (e.g., plex, nginx)'
|
||||
required: true
|
||||
type: string
|
||||
folder_type:
|
||||
description: 'Is this a template or a stack?'
|
||||
required: true
|
||||
type: choice
|
||||
options:
|
||||
- templates
|
||||
- stacks
|
||||
default: 'stacks'
|
||||
|
||||
jobs:
|
||||
create-files:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Create Directory and Files
|
||||
run: |
|
||||
TARGET_DIR="${{ inputs.folder_type }}/${{ inputs.app_name }}"
|
||||
mkdir -p "$TARGET_DIR"
|
||||
|
||||
# Create empty docker-compose
|
||||
touch "$TARGET_DIR/docker-compose.yml"
|
||||
|
||||
# Create README with basic template
|
||||
cat <<EOF > "$TARGET_DIR/README.md"
|
||||
# ${{ inputs.app_name }} (${{ inputs.folder_type }})
|
||||
|
||||
### Description
|
||||
Description for ${{ inputs.app_name }} goes here.
|
||||
|
||||
### Configuration
|
||||
- Path: $TARGET_DIR/docker-compose.yml
|
||||
- Status: Draft
|
||||
EOF
|
||||
|
||||
- name: Commit and Push
|
||||
run: |
|
||||
git config --global user.name "Gitea Action"
|
||||
git config --global user.email "actions@gitea.io"
|
||||
git add .
|
||||
git commit -m "feat: initialized ${{ inputs.folder_type }}/${{ inputs.app_name }}."
|
||||
git push
|
||||
Reference in New Issue
Block a user