Skip to content

Better latency

Better latency #45

name: Translate and Build Package
# Controls when the workflow will run
on:
workflow_dispatch:
push:
#branches: [ "master", "main", "*" ]
branches: [ "*" ]
#pull_request:
#branches: [ "master", "main", "*" ]
#branches: [ "*" ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
# - name: Install Translator Dependencies
# shell: bash
# run: |
# sudo apt-get update
# sudo apt-get install \
# git \
# gettext \
# npm
# # Install attranslator
# sudo npm install --location=global attranslate
# - name: Translate Package
# shell: bash -O extglob {0}
# env:
# AZURE_KEY: ${{ secrets.AZURE_KEY }}
# run: |
# cd ..
# git clone https://github.com/biglinux/big-auto-translator.git
# mv big-auto-translator/gettext_po_generator_github.sh .
# gitfolder=$(echo ${{ github.repository }} | rev | cut -d "/" -f1 | rev)
# bash gettext_po_generator_github.sh $gitfolder
## Tmate ##
#- name: Setup tmate session
#uses: mxschmitt/action-tmate@v3
# - name: Update github
# run: |
# git add --all
# git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
# git config --local user.name "github-actions[bot]"
# if [ -n "$(git commit -m "new translate" -a | grep "nothing to commit")" ];then exit 0; fi
# - 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: |
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 }}", "version": "1.2.3"}}' https://api.github.com/repos/BigLinux-Package-Build/build-package/dispatches