Skip to content

Remake PKGBUILD

Remake PKGBUILD #131

name: Remake PKGBUILD and Build Package
on:
# workflow_dispatch:
# push:
#branches: [ "master", "main", "*" ]
# branches: [ "*" ]
repository_dispatch:
types:
- '**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: echo PayLoads
run: |
echo "repo: ${{ github.event.client_payload.repo }}"
echo "mod: ${{ github.event.client_payload.mod }}"
echo "mkdepends: ${{ github.event.client_payload.mkdepends }}"
echo "xanmod: ${{ github.event.client_payload.xanmod }}"
echo "branch_build: ${{ github.event.client_payload.branch_build }}"
# # Tmate ##
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
- name: Remake PKGBUILD
id: remakepkg
uses: BigLinux-Package-Build/xanmod-extra-module@main
with:
repo: ${{ github.event.client_payload.repo }}
repoServer: ${{ secrets.DEV_REPOSITY }}
mod: ${{ github.event.client_payload.mod }}
mkdepends: ${{ github.event.client_payload.mkdepends }}
xanmod: ${{ github.event.client_payload.xanmod }}
- name: Update github
run: |
git add --all
git config --local user.email "${{ secrets.GIT_USER }}@users.noreply.github.com"
git config --local user.name "${{ secrets.GIT_USER }}"
if [ -n "$(git commit -m "new version" -a | grep "nothing to commit")" ];then exit 0; fi
echo "newVer=true" >> $GITHUB_ENV
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
- name: Send Hooks BigLinux Build Package
shell: bash
run: |
if [ "$newVer" = "true" ];then
curl -X POST -H "Accept: application/json" -H "Authorization: token ${{ secrets.WEBHOOK_TOKEN }}" --data '{"event_type": "${{ github.repository }}", "client_payload": { "branch": "${{ github.ref_name }}", "url": "https://github.com/${{ github.repository }}", "branch_build": "${{ github.event.client_payload.branch_build }}"}}' https://api.github.com/repos/BigLinux-Package-Build/build-package/dispatches
fi