Skip to content

update-event

update-event #1055

Workflow file for this run

name: Features - Auto
on:
repository_dispatch:
types: [update-event]
jobs:
download-and-extract:
runs-on: ubuntu-latest
env:
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
CHANNEL_ID: ${{ secrets.CHANNEL_ID }}
PIN_MSG: ${{ secrets.PIN_MSG }}
DEBUG: ${{ secrets.DEBUG }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install modules
run: |
pip install -r requirements.txt
- name: Download & Extract
run: |
python src/main.py ${{ github.event.client_payload.vername }} ${{ github.event.client_payload.src }} ${{ github.event.client_payload.vercode }} ${{ github.event.client_payload.downLink }}
- name: Add extracted file to Git
id: vars
run: |
git fetch
CHANGES=$(git diff --name-only origin/main)
if [ -n "$CHANGES" ]; then
echo "Changes found."
python src/git.py
echo "PUSH=1" >> $GITHUB_OUTPUT
else
echo "No changes found."
echo "PUSH=0" >> $GITHUB_OUTPUT
fi
- name: Commit data
uses: rlespinasse/git-commit-data-action@v1
- name: Changes to Telegram
run: |
python src/changes.py ${{ github.event.client_payload.msg_id }} ${{secrets.GIT_COMMIT_SHA}}