Kam Exec #19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Kam Exec | |
| permissions: | |
| contents: write | |
| actions: read | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| kam-command: | |
| description: Command to run | |
| required: false | |
| type: string | |
| default: kam version patch && kam build -a -s -r | |
| jobs: | |
| build: | |
| 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 }} | |
| enable-cache: "true" | |
| private-key: ${{ secrets.KAM_PRIVATE_KEY }} | |
| - name: Verify kam installation | |
| run: kam --version | |
| - name: Run kam command | |
| shell: bash | |
| run: | | |
| git submodule update --init --recursive | |
| git submodule update --remote --merge --recursive | |
| kam build --help | |
| rm -rf dist | |
| chmod +x hooks/**/* | |
| chmod +x src/**/* | |
| echo "Executing: ${{ github.event.inputs.kam-command }}" | |
| ${{ github.event.inputs.kam-command }} | |
| 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 }} |