Skip to content

use commit action

use commit action #14

name: Update Tapplets Registry
on:
workflow_dispatch:
push:
branches:
- main
# Give the default GITHUB_TOKEN write permission to commit and push the changed files back to the repository.
permissions:
contents: write
jobs:
register-tapp:
runs-on: ubuntu-latest
outputs:
registry-version: ${{steps.tapp-register.outputs.registry-version}}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Register tapplet
id: tapp-register
uses: karczuRF/registry-updater@main
- name: Commit updated files
id: push-commit
run: |
git config user.name "${{ github.actor }}"
git config --global user.email "${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com"
git add -A
git commit -m "Update registry to v${{steps.tapp-register.outputs.registry-version}}"
git fetch origin
git rebase --strategy-option=theirs origin/main
git push --force
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}