-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (55 loc) · 2 KB
/
Copy pathinit.yml
File metadata and controls
55 lines (55 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Kam Project Initialization
permissions:
contents: write
actions: read
on:
workflow_dispatch:
inputs:
template-url:
description: "Template download URL (single template: .tar.gz; multiple templates: .zip) - leave empty to skip template import"
required: false
type: string
default: https://github.com/MemDeco-WG/Kam/releases/latest/download/templates.zip
init-command:
description: Full initialization command (complete command to run after setup/template import)
required: false
type: string
default: kam init . -t kam_template
enable-cache:
description: Toggle version-aware caching for kam and Cargo
required: false
type: string
default: "true"
jobs:
run-initialization:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup kam
uses: MemDeco-WG/setup-kam@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
template-url: ${{ github.event.inputs.template-url }}
enable-cache: ${{ github.event.inputs.enable-cache }}
- name: Verify kam installation
run: kam --version
- name: Run initialization command
shell: bash
run: |
kam init --help
echo "Running initialization command: ${{ github.event.inputs.init-command }}"
${{ github.event.inputs.init-command }}
echo "Initialization completed successfully"
env:
GH_TOKEN: ${{ github.token }}
- name: Auto-commit changes
uses: stefanzweifel/git-auto-commit-action@v7
with:
commit_message: |
chore: apply config - Template: ${{ github.event.inputs.template-url || 'No template' }} - Command: ${{ github.event.inputs.init-command || github.event.inputs.kam-command }}
file_pattern: |
*
push_options: --force-with-lease
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}