tapp-example-1.0.0 #49
Workflow file for this run
This file contains 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: Check the tapplet | |
on: | |
workflow_dispatch: | |
inputs: | |
package-name: | |
description: "Tapplet package name" | |
required: true | |
default: "tapp-example" | |
package-version: | |
description: "The tapplet package version" | |
required: true | |
default: "1.0.0" | |
pull_request: | |
branches: | |
- main | |
permissions: | |
contents: write | |
jobs: | |
read-variables: | |
runs-on: ubuntu-latest | |
outputs: | |
name: ${{ steps.var-setup.outputs.name }} | |
version: ${{ steps.var-setup.outputs.version }} | |
steps: | |
- name: Variables setup | |
id: var-setup | |
shell: bash | |
run: | | |
ref_name=${{ github.ref_name }} | |
IFS="-" read -r NAME VERSION <<< "$ref_name" | |
echo "name=${NAME}" >> $GITHUB_OUTPUT | |
echo "version=${VERSION}" >> $GITHUB_OUTPUT | |
check-tapp: | |
runs-on: ubuntu-latest | |
needs: read-variables | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Register tapplet | |
uses: karczuRF/ga-test@main | |
with: | |
package-name: ${{needs.read-variables.outputs.name}} | |
package-version: ${{needs.read-variables.outputs.version}} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
update-registry: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Commit updated files | |
id: push-commit | |
run: | | |
git config user.name "karczuRF" | |
git config user.email "${{ secrets.EMAIL }}" | |
git add -A | |
git commit -m "Register tapplet" | |
git fetch origin | |
git rebase --strategy-option=theirs origin/main | |
git push origin HEAD:${{github.ref_name}} --force | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
EMAIL: ${{ secrets.EMAIL }} |